Search Results

Search found 399 results on 16 pages for 'spacing'.

Page 11/16 | < Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • For LinqToSQL is 0 true or is 1 (for type Bit)?

    - by Vaccano
    I have a column of type Bit (called BBoolVal in this example). I have a LinqToSQL Statement Like this: var query = List<MyClass> myList = _ctx.DBList .Where(x => x.AGuidID == paramID) .Where(x => x.BBoolVal == false); When I look at the sql it ends up like this (I added the spacing and changed the names): SELECT [t0].[Id], [t0].[AGuidID], [t0].[OtherIDID], [t0].[TimeColumn], [t0].[BBoolVal], [t0].[MoreID] FROM [dbo].[MyTable] AS [t0] WHERE (NOT ([t0].[BBoolVal] = 1)) AND ([t0].[AGuidID] = @p0) Because my x.BBoolVal == false translates to [BBoolVal] == 1 I gather that false = 1 (and thus true = 0). I am asking because this seems a bit backwards to me. I am fine to accept it, I just want to be sure.

    Read the article

  • Is a selector like *+* safe to use?

    - by mcmullins
    I recently came across this CSS selector while trying to find a way to easily space out major blog elements such as paragraphs and images. An example of its use would be something like this: .post *+* {margin-top: 15px;} /* or... */ .post > *+* {margin-top: 15px;} /* if you don't want the margin to apply to nested elements */ At first glance, it seemed pretty useful. So my question is: What downsides are there to using these selectors? Specifically: What's the browser support like for this? Are there any cases you wouldn't want an even margin spacing between elements in an article and if not, is it easier to declare this first and then overwrite or simply declare each element individually? Does this have performance issues since you're selecting everything twice?

    Read the article

  • C# String builder, displaying data nicely spaced out.

    - by Sef
    Hello, I am wondering how exactly can i order my date nicely in a stringbuilder? Meaning something equal to ("{0,2}", ....) to space the data nicely out. I do not want to use consolewrites of any kind, so the class can be re-used in a form, console code etc... Currently i am using " " for the spacing, but in overall it does not give a proper display. (it messed up when i have numbers with more then 1 digit) public override string ToString() { StringBuilder builder = new StringBuilder(); foreach (int value in tabel) { builder.Append(value); // should have something similiar to ("{0,2}", ....) builder.Append(" "); // should have something similiar to ("{0,2}", ....) } builder.Append("(top:"); builder.Append(top); builder.Append(")"); return builder.ToString(); }/*ToString*/ Regards.

    Read the article

  • How can I modify the application file of an application that is currently running (on Linux)?

    - by Hach-Que
    I have an application running called AppFS. This application has an ext2 filesystem just attached to the end of the file (it's positioned so that the application binary exists in a 1MB spacing area, followed by the ext2 data). Now I've got FUSE embedded in the program and I've managed to extract the filesystem out of the application data into a temporary file so that FUSE can mount / use it. The problem I have now is writing the temporary file back into the application file. I get "Text file busy" presumably because the application has locked itself and won't let writes occur. Is there a way I can force the file to become unlocked so I can write data to it? (It's important to note that I'm not changing the application binary area - just rewriting the ext2 component.) It needs to be unlocked without requiring root permissions (unlocked by the same user who started the application).

    Read the article

  • How to create a numbered bullet not in UIwebview but using UItextview

    - by Raviraj Peerbits II
    The format is similar to below text: 1. I need to create the bullet like this which would be helpful to me in my application and need someone to you to share the code with me. 2. Can you help me out and remember the UIwebview is not preferable because i dont have to execute the webviewwillload method. 3. Please find the best and easy way to approach this. 4. Also remember there should be indent spacing. Thanks in advance and its urgent for me.

    Read the article

  • Remove margin between rows of overflowing inline elements

    - by Ian
    I'm creating a tile-based game and am using block rendering to update a large list of tiles. I'm attempting to do this in the most simple manner, so I've been trying to work with HTML's default layouts. Right now I'm creating 'inline-blocks', omitting whitespace between the elements to avoid horizontal spaces in between them but when the blocks overflow and create a new line there is some vertical margining in which I do not know how to remove. Example to make this a bit clearer: http://jsfiddle.net/mLa93/13/ (Pretty much I just need to remove the spacing between the block rows while retaining the simple markup.)

    Read the article

  • Makefile won't copy .o to obj/ and target to bin/ folders

    - by about blank
    I'm trying to write a Makefile which will copy its target and objects to bin/ and obj/ directories, respectively. Yet, when I try to run it I get the following error: nasm -f elf64 -g -F stabs main.asm -l spacelander.lst ld -o spacelander obj/main.o ld: cannot find obj/main.o: No such file or directory make: *** [spacelander] Error 1 Why is this happening? Update I noticed when I posted the error that it was due to white spacing errors. After taking care of those, I still get the new error I replaced with the old one I mentioned prior. What is this?? Update 2 Posted -d flag output below Makefile source. Source ASM := nasm ARGS := -f FMT := elf64 OPT := -g -F stabs SRC := main.asm OBJDIR := obj TARGETDIR := bin OBJ := $(addprefix $(OBJDIR)/,$(patsubst %.asm, %.o, $(wildcard *.asm))) TARGET := spacelander .PHONY: all clean all: $(OBJDIR) $(TARGET) $(OBJDIR): mkdir $(OBJDIR) $(OBJDIR)/%.o: $(SRC) $(ASM) $(ARGS) $(FMT) $(OPT) $(SRC) -l $(TARGET).lst $(TARGET): $(OBJ) ld -o $(TARGET) $(OBJ) clean: @rm -f $(TARGET) $(wildcard *.o) @rm -rf $(OBJDIR) make -d Output - NOTE: output is too many characters for body, thus is pastebinned http://pastebin.com/3bctGJxs

    Read the article

  • New regular expression features in PCRE 8.34 and 8.35

    - by Jan Goyvaerts
    PCRE 8.34 adds some new regex features and changes the behavior of a few to make it better compatible with the latest versions of Perl. There are no changes to the regex syntax in PCRE 8.35. \o{377} is now an octal escape just like \377. This syntax was first introduced in Perl 5.12. It avoids any confusion between octal escapes and backreferences. It also allows octal numbers beyond 377 to be used. E.g. \o{400} is the same as \x{100}. If you have any reason to use octal escapes instead of hexadecimal escapes then you should definitely use the new syntax. Because of this change, \o is now an error when it doesn’t form a valid octal escape. Previously \o was a literal o and \o{377} was a sequence of 337 o‘s. In free-spacing mode, whitespace between a quantifier and the ? that makes it lazy or the + that makes it possessive is now ignored. In Perl this has always been the case. In PCRE 8.33 and prior, whitespace ended a quantifier and any following ? or + was seen as a second quantifier and thus an error. The shorthand \s now matches the vertical tab character in addition to the other whitespace characters it previously matched. Perl 5.18 made the same change. Many other regex flavors have always included the vertical tab in \s, just like POSIX has always included it in [[:space:]]. Names of capturing groups are no longer allowed to start with a digit. This has always been the case in Perl since named groups were added to Perl 5.10. PCRE 8.33 and prior even allowed group names to consist entirely of digits. [[:<:]] and [[::]] are now treated as POSIX-style word boundaries. They match at the start and the end of a word. Though they use similar syntax, these have nothing to do with POSIX character classes and cannot be used inside character classes. Perl does not support POSIX word boundaries. The same changes affect PHP 5.5.10 (and later) and R 3.0.3 (and later) as they have been updated to use PCRE 8.34. RegexBuddy and RegexMagic have been updated to support the latest versions of PCRE, PHP, and R. Older versions that were previously supported are still supported, so you can compare or convert your regular expressions between the latest versions of PCRE, PHP, and R and whichever version you were using previously.

    Read the article

  • Correcting Grammar for Microsoft Products and Technology

    I see book authors, editors, bloggers, press, team members, and occasionally even a VP misspell our products, technologies, and features that I thought I would build and maintain a list of the correct capitalization and spelling of the most commonly misspelled Microsoft products and technologies. Sources: Internal site (brandtools) and the Microsoft Trademarks Web site. Last updated: April 27, 2010   Incorrect Correct .net or .Net .NET .Net framework 4.0, .NET framework 4.0 .NET Framework AdCenter, Ad Center, Adcenter adCenter Ado.net, ADO.Net ADO.NET Asp.net, ASP.Net ASP.NET Asp.Net ajax, Asp.NET Ajax ASP.NET AJAX Asp.Net Mvc ASP.NET MVC Biz Spark, Bizspark BizSpark Clear Type, Clear type, Cleartype ClearType Directaccess, Direct Access DirectAccess Direct Show, Directshow DirectShow Direct X DirectX Dream Spark, Dreamspark DreamSpark Home Group, Home group HomeGroup HotMail, Hot Mail Hotmail Info Path, Infopath InfoPath Intellisense, Intellisense IntelliSense Iron Ruby IronRuby Kin KIN Linq LINQ MSN Messenger Windows Live Messenger One Note, Onenote OneNote Open type, Opentype OpenType PlayTo, Play to Play To Power Point, Powerpoint PowerPoint Powershell, Power Shell PowerShell Sea Dragon, Seadragon SeaDragon Sharepoint, Share Point SharePoint Silver Light, SilverLight Silverlight Skydrive, Sky Drive SkyDrive Sql Server SQL Server Visual Basic .net (the .net was removed in the 2005 version) Visual Basic  Visual C# Express 2010 or Visual Basic Express 2010 or Visual C++ Express 2010 Visual version 2010 Express as in Visual C# 2010 Express, Visual Basic 2010 Express Visual Studio 2010 Team Foundation Server Visual Studio Team Foundation Server 2010 Visual Studio Ultimate 2010 or Visual Studio Professional 2010 Visual Studio 2010 version, as in Visual Studio 2010 Ultimate, Visual Studio 2010 Professional WebSite Spark, Website spark Website Spark Win 32 Win32 Windows Mobile (except when referring to previous versions like 5.0 or 6), Windows phone 7 Series Windows Phone Xaml XAML XBOX, xbox Xbox Xbox Live, XBOX Live Xbox LIVE   Caveats These guidelines dont apply to URLs (ex: www.asp.net) or to code namespaces, variables, and classes should follow the .NET Framework naming guidelines. This list only covers capitalization/spacing rules, it doesnt cover the correct usage of (tm) or symbols or the correct word usage rules. For those, refer to the trademark Web site. Also note that I have no idea why we are so inconsistent say on keeping features/brands two words versus one word or the order of product/version/year.Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Hostapd - WLAN as AP

    - by BBK
    I'm trying to start hostapd but without success. I'm using Headless Ubuntu 11.10 oneiric 3.0.0-16-server x86_64. WLAN driver is rt2800usb and my wireless nic card TP-Link TL-WN727N supports AP mode as shows below: us0# ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr 00:27:19:be:cd:b6 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) us0# lsusb Bus 003 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter us0# lshw -C network *-network:3 description: Wireless interface physical id: 4 bus info: usb@3:2 logical name: wlan0 serial: 00:27:19:be:cd:b6 capabilities: ethernet physical wireless configuration: broadcast=yes driver=rt2800usb driverversion=3.0.0-16-server firmware=0.29 link=no multicast=yes wireless=IEEE 802.11bgn us0# hostapd /etc/hostapd/hostapd.conf Configuration file: /etc/hostapd/hostapd.conf Could not read interface wlan0 # The int flags: No such device nl80211 driver initialization failed. ELOOP: remaining socket: sock=4 eloop_data=0xd3e4a0 user_data=0xd3ecc0 handler=0x433880 ELOOP: remaining socket: sock=6 eloop_data=0xd411f0 user_data=(nil) handler=0x43cc10 us0# cat /etc/hostapd/hostapd.conf ssid=Home interface=wlan0 # The interface name of the card #driver=rt2800usb driver=nl80211 macaddr_acl=0 ieee80211n=1 channel=1 hw_mode=g auth_algs=1 ignore_broadcast_ssid=0 wpa=2 wpa_passphrase=88888888 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP us0# iw list Wiphy phy0 Band 1: Capabilities: 0x172 HT20/HT40 Static SM Power Save RX Greenfield RX HT20 SGI RX HT40 SGI RX STBC 1-stream Max AMSDU length: 7935 bytes No DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 2 usec (0x04) HT RX MCS rate indexes supported: 0-7, 32 TX unequal modulation not supported HT TX Max spatial streams: 1 HT TX MCS rate indexes supported may differ Frequencies: * 2412 MHz [1] (20.0 dBm) * 2417 MHz [2] (20.0 dBm) * 2422 MHz [3] (20.0 dBm) * 2427 MHz [4] (20.0 dBm) * 2432 MHz [5] (20.0 dBm) * 2437 MHz [6] (20.0 dBm) * 2442 MHz [7] (20.0 dBm) * 2447 MHz [8] (20.0 dBm) * 2452 MHz [9] (20.0 dBm) * 2457 MHz [10] (20.0 dBm) * 2462 MHz [11] (20.0 dBm) * 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS) * 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS) * 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS) Bitrates (non-HT): * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps max # scan SSIDs: 4 Supported interface modes: * IBSS * managed * AP * AP/VLAN * WDS * monitor * mesh point Supported commands: * new_interface * set_interface * new_key * new_beacon * new_station * new_mpath * set_mesh_params * set_bss * authenticate * associate * deauthenticate * disassociate * join_ibss * Unknown command (68) * Unknown command (55) * Unknown command (57) * Unknown command (59) * Unknown command (67) * set_wiphy_netns * Unknown command (65) * Unknown command (66) * connect * disconnect The question is: Why the hostapd not starting?

    Read the article

  • Commit Review Questions

    - by Wes McClure
    Note: in this article when I refer to a commit, I mean the commit you plan to share with the rest of the team, if you have local commits that you plan to amend/combine, I am referring to the final result. In time you will find these easier to do as you develop, however, all of these are valuable before checking in!  The pre commit review is a nice time to polish what might have been several hours of intense work, during which these things were the last things on your mind!  If you are concerned about losing your work in the process of responding to these questions, first do a check-in and amend it as you go (assuming you are using a tool such as git that supports this), rolling the result into one nice commit for everyone else.  Did you review your commit, change by change, with a diff utility? If not, this is a list of reasons why you might want to start! Did you test your changes? If the test is valuable to be automated, is it? If it’s a manual testing scenario, did you at least try the basics manually? Are the additions/changes formatted consistently with the rest of the project? Lots of automated tools can help here, don’t try to manually format the code, that’s a waste of time and as a human you will fail repeatedly. Are these consistent: tabs versus spaces, indentation, spacing, braces, line breaks, etc Resharper is a great example of a tool that can automate this for you (.net) Are naming conventions respected? Did you accidently use abbreviations, unless you have a good reason to use them? Does capitalization match the conventions in the project/language? Are files partitioned? Sometimes we add new code in existing files in a pinch, it’s a good idea to split these out if they don’t belong ie: are new classes defined in new files, if this is something your project values? Is there commented out code? If you are removing an existing feature, get rid of it, that is why we have VCS If it’s not done yet, then why are you checking it in? Perhaps a stash commit (git)? Did you leave debug or unnecessary changes? Do you understand all of the changes? http://geekswithblogs.net/wesm/archive/2012/04/11/programming-doesnrsquot-have-to-be-magic.aspx Are there spelling mistakes? Including your commit message! Is your commit message concise? Is there follow up work? Are there tasks you didn’t write down that you need to follow up with? Are readability or reorganization changes needed? This might be amended into the final commit, or it might be future work that needs added to the backlog. Are there other things your team values that you should review?

    Read the article

  • nautilus selected item color

    - by shantanu
    See in the image, selected item "build" colour is black as background colour. How can i change the selected item colour gtk3 theme's nautilus.css script Which section colour need to modify: /* desktop mode */ .nautilus-desktop.nautilus-canvas-item { color: @bg_color; text-shadow: 1 1 alpha (#001B33, 0.8); } .nautilus-desktop.nautilus-canvas-item:active { background-image: none; background-color: alpha (@selected_bg_color, 0.84); border-radius: 4; color: @fg_color; } .nautilus-desktop.nautilus-canvas-item:selected { background-image: none; background-color: alpha (@bg_color, 0.84); border-radius: 4; color: @selected_fg_color; } .nautilus-desktop.nautilus-canvas-item:active, .nautilus-desktop.nautilus-canvas-item:prelight, .nautilus-desktop.nautilus-canvas-item:selected { text-shadow: none; } /* browser window */ NautilusTrashBar.info, NautilusXContentBar.info, NautilusSearchBar.info, NautilusQueryEditor.info { /* this background-color controls the symbolic icon in the entry */ background-color: mix (@fg_color, @base_color, 0.3); border-radius: 0; border-style: solid; border-width: 0 1 1 1; } NautilusSearchBar .entry { } .nautilus-cluebar-label { color: @fg_color; font: bold; } #nautilus-search-button *:active, #nautilus-search-button *:active:prelight { color: @dark_fg_color; } NautilusFloatingBar { background-color: @info_bg_color; border-radius: 3 3 0 0; border-style: solid; border-width: 1; border-color: darker (@info_bg_color); -unico-border-gradient: none; } NautilusFloatingBar .button { -GtkButton-image-spacing: 0; -GtkButton-inner-border: 0; } /* sidebar */ NautilusWindow .sidebar, NautilusWindow .sidebar .view { background-color: @bg_color; color: @fg_color; } NautilusWindow .sidebar .frame { } NautilusWindow > GtkTable > .pane-separator { background-color: @bg_color; border-color: @bg_color; border-width: 0 0 0 0; border-style: solid; }

    Read the article

  • Creating smooth lighting transitions using tiles in HTML5/JavaScript game

    - by user12098
    I am trying to implement a lighting effect in an HTML5/JavaScript game using tile replacement. What I have now is kind of working, but the transitions do not look smooth/natural enough as the light source moves around. Here's where I am now: Right now I have a background map that has a light/shadow spectrum PNG tilesheet applied to it - going from darkest tile to completely transparent. By default the darkest tile is drawn across the entire level on launch, covering all other layers etc. I am using my predetermined tile sizes (40 x 40px) to calculate the position of each tile and store its x and y coordinates in an array. I am then spawning a transparent 40 x 40px "grid block" entity at each position in the array The engine I'm using (ImpactJS) then allows me to calculate the distance from my light source entity to every instance of this grid block entity. I can then replace the tile underneath each of those grid block tiles with a tile of the appropriate transparency. Currently I'm doing the calculation like this in each instance of the grid block entity that is spawned on the map: var dist = this.distanceTo( ig.game.player ); var percentage = 100 * dist / 960; if (percentage < 2) { // Spawns tile 64 of the shadow spectrum tilesheet at the specified position ig.game.backgroundMaps[2].setTile( this.pos.x, this.pos.y, 64 ); } else if (percentage < 4) { ig.game.backgroundMaps[2].setTile( this.pos.x, this.pos.y, 63 ); } else if (percentage < 6) { ig.game.backgroundMaps[2].setTile( this.pos.x, this.pos.y, 62 ); } // etc... (sorry about the weird spacing, I still haven't gotten the hang of pasting code in here properly) The problem is that like I said, this type of calculation does not make the light source look very natural. Tile switching looks too sharp whereas ideally they would fade in and out smoothly using the spectrum tilesheet (I copied the tilesheet from another game that manages to do this, so I know it's not a problem with the tile shades. I'm just not sure how the other game is doing it). I'm thinking that perhaps my method of using percentages to switch out tiles could be replaced with a better/more dynamic proximity forumla of some sort that would allow for smoother transitions? Might anyone have any ideas for what I can do to improve the visuals here, or a better way of calculating proximity with the information I'm collecting about each tile? (PS: I'm reposting this from Stack Overflow at someone's suggestion, sorry about the duplicate!)

    Read the article

  • Handling bugs, quirks, or annoyances in vendor-supplied headers

    - by supercat
    If the header file supplied by a vendor of something with whom one's code must interact is deficient in some way, in what cases is it better to: Work around the header's deficiencies in the main code Copy the header file to the local project and fix it Fix the header file in the spot where it's stored as a vendor-supplied tool Fix the header file in the central spot, but also make a local copy and try to always have the two match Do something else As an example, the header file supplied by ST Micro for the STM320LF series contains the lines: typedef struct { __IO uint32_t MODER; __IO uint16_t OTYPER; uint16_t RESERVED0; .... __IO uint16_t BSRRL; /* BSRR register is split to 2 * 16-bit fields BSRRL */ __IO uint16_t BSRRH; /* BSRR register is split to 2 * 16-bit fields BSRRH */ .... } GPIO_TypeDef; In the hardware, and in the hardware documentation, BSRR is described as a single 32-bit register. About 98% of the time one wants to write to BSRR, one will only be interested in writing the upper half or the lower half; it is thus convenient to be able to use BSSRH and BSSRL as a means of writing half the register. On the other hand, there are occasions when it is necessary that the entire 32-bit register be written as a single atomic operation. The "optimal" way to write it (setting aside white-spacing issues) would be: typedef struct { __IO uint32_t MODER; __IO uint16_t OTYPER; uint16_t RESERVED0; .... union // Allow BSRR access as 32-bit register or two 16-bit registers { __IO uint32_t BSRR; // 32-bit BSSR register as a whole struct { __IO uint16_t BSRRL, BSRRH; };// Two 16-bit parts }; .... } GPIO_TypeDef; If the struct were defined that way, code could use BSRR when necessary to write all 32 bits, or BSRRH/BSRRL when writing 16 bits. Given that the header isn't that way, would better practice be to use the header as-is, but apply an icky typecast in the main code writing what would be idiomatically written as thePort->BSRR = 0x12345678; as *((uint32_t)&(thePort->BSSRH)) = 0x12345678;, or would be be better to use a patched header file? If the latter, where should the patched file me stored and how should it be managed?

    Read the article

  • openGL textures in bitmap mode

    - by evenex_code
    For reasons detailed here I need to texture a quad using a bitmap (as in, 1 bit per pixel, not an 8-bit pixmap). Right now I have a bitmap stored in an on-device buffer, and am mounting it like so: glBindBuffer(GL_PIXEL_UNPACK_BUFFER, BFR.G[(T+1)%2]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, W, H, 0, GL_COLOR_INDEX, GL_BITMAP, 0); The OpenGL spec has this to say about glTexImage2D: "If type is GL_BITMAP, the data is considered as a string of unsigned bytes (and format must be GL_COLOR_INDEX). Each data byte is treated as eight 1-bit elements..." Judging by the spec, each bit in my buffer should correspond to a single pixel. However, the following experiments show that, for whatever reason, it doesn't work as advertised: 1) When I build my texture, I write to the buffer in 32-bit chunks. From the wording of the spec, it is reasonable to assume that writing 0x00000001 for each value would result in a texture with 1-px-wide vertical bars with 31-wide spaces between them. However, it appears blank. 2) Next, I write with 0x000000FF. By my apparently flawed understanding of the bitmap mode, I would expect that this should produce 8-wide bars with 24-wide spaces between them. Instead, it produces a white 1-px-wide bar. 3) 0x55555555 = 1010101010101010101010101010101, therefore writing this value ought to create 1-wide vertical stripes with 1 pixel spacing. However, it creates a solid gray color. 4) Using my original 8-bit pixmap in GL_BITMAP mode produces the correct animation. I have reached the conclusion that, even in GL_BITMAP mode, the texturer is still interpreting 8-bits as 1 element, despite what the spec seems to suggest. The fact that I can generate a gray color (while I was expecting that I was working in two-tone), as well as the fact that my original 8-bit pixmap generates the correct picture, support this conclusion. Questions: 1) Am I missing some kind of prerequisite call (perhaps for setting a stride length or pack alignment or something) that will signal to the texturer to treat each byte as 8-elements, as it suggests in the spec? 2) Or does it simply not work because modern hardware does not support it? (I have read that GL_BITMAP mode was deprecated in 3.3, I am however forcing a 3.0 context.) 3) Am I better off unpacking the bitmap into a pixmap using a shader? This is a far more roundabout solution than I was hoping for but I suppose there is no such thing as a free lunch.

    Read the article

  • IPMI not fucntioning with Network Bonding

    - by muhammed sameer
    Hey, I am having problems with running IPMI on my servers that have network bonding enabled. Platform: CentOS release 5.3 (Final) Kernel: 2.6.18-92.el5 64bit Dell PowerEdge 1950 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet I have bonded the interface eth0 and eth1 as active passive, with eth0 as the active interface, below is conf description from /proc Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth0 Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 30 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:22:19:56:b9:cd Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 00:22:19:56:b9:cf My IPMI device is as follows IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x0000000000000CA8 (I/O) Register Spacing: 32-bit Boundaries I Have used openIPMI as well as freeipmi both to control the chassis via the IPMI card, but on servers which have bonding enabled, the command times out, below is the full run of the command with debug info. ipmi_lan_send_cmd:opened=[0], open=[4482848] IPMI LAN host 70.87.28.115 port 623 Sending IPMI/RMCP presence ping packet ipmi_lan_send_cmd:opened=[1], open=[4482848] No response from remote controller Get Auth Capabilities command failed ipmi_lan_send_cmd:opened=[1], open=[4482848] No response from remote controller Get Auth Capabilities command failed Error: Unable to establish LAN session Failed to open LAN interface Unable to get Chassis Power Status On the other hand I configured IPMI on a box with the same specs as mentioned above without bonding and IPMI works perfectly. Has anyone faced this problem with IPMI + Bonding ? I would be thankful is someone helps circumvent this issue. Muhammed Sameer

    Read the article

  • Block protect (Keep last line of paragraph with next paragraph)

    - by Ed Cottrell
    Is there a way to force Microsoft Word 2010 to keep the last line of a paragraph with the next paragraph? An example of when this is relevant is when starting a block quote; it doesn't look good to have the block quote start at the top of a new page, particularly when it's introduced by a partial sentence, like this: "Lorem ipsum" is sample text widely used in the publishing industry, as the text has spacing roughly similar to that of English and therefore looks "normal" but unintelligible to an English reader's eye, allowing the reader to focus on design elements. It begins, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rhoncus laoreet risus, quis congue leo viverra congue. Suspendisse magna massa, viverra imperdiet est eu, ultrices volutpat lectus. Sed pulvinar est id risus lobortis venenatis. There shouldn't be a page break after "begins," because it looks like the sentence ends abruptly. "Keep lines together" won't work, because by definition we're talking about two paragraphs. "Keep with next" won't work if the first paragraph is larger than a couple of lines, because then you get an awkwardly large space at the bottom of a page. Manual line breaks obviously work, but only when the document is final, which is often less certain than it seems. I know WordPerfect has a feature called "block protect" that does this, but I have not found even an acceptable substitute in Word. I have played with style separators and hidden paragraph breaks, but to no avail. I would love a special character, kind of like the nonbreaking space or zero width optional space, that tells Word to move to the next page if the next paragraph would otherwise start the page. A macro would also be great, but I haven't been able to find a starting point (like how to detect where non-manual page breaks fall). Edit: It looks like "Keep with next" works this way in Word 2013, but I specifically need a fix that works in Word 2010.

    Read the article

  • What are the frequencies of current in computers' external peripheral cables and internal buses?

    - by Tim
    From Wikipedia, three different cases of current frequency are discussed along with the types of cables that are suitable for them: An Extra Ordinary electrical cables suffice to carry low frequency AC, such as mains power, which reverses direction 100 to 120 times per second (cycling 50 to 60 times per second). However, they cannot be used to carry currents in the radio frequency range or higher, which reverse direction millions to billions of times per second, because the energy tends to radiate off the cable as radio waves, causing power losses. Radio frequency currents also tend to reflect from discontinuities in the cable such as connectors, and travel back down the cable toward the source. These reflections act as bottlenecks, preventing the power from reaching the destination. Transmission lines use specialized construction such as precise conductor dimensions and spacing, and impedance matching, to carry electromagnetic signals with minimal reflections and power losses. Types of transmission line include ladder line, coaxial cable, dielectric slabs, stripline, optical fiber, and waveguides. The higher the frequency, the shorter are the waves in a transmission medium. Transmission lines must be used when the frequency is high enough that the wavelength of the waves begins to approach the length of the cable used. To conduct energy at frequencies above the radio range, such as millimeter waves, infrared, and light, the waves become much smaller than the dimensions of the structures used to guide them, so transmission line techniques become inadequate and the methods of optics are used. I wonder what the frequencies are for the currents in computers' external peripheral cables, such as Ethernet cable, USB cable, and in computers' internal buses? Are the cables also made specially for the frequencies? Thanks!

    Read the article

  • Printing a PDF results in garbled text (sometimes)

    - by Scott Whitlock
    We have a system that renders a report as a PDF, and displays it in the browser for the user. In the browser, the document always appears to display fine, but when printed on one machine, it sometimes changes some of the data in the report to seemingly random characters. Here are some examples of the strings it inserts: Ebuf; Bvhvt ul1: -!3122 Ti jqqf e!Wjb; Nfttf ohf s!Tf swjdf Additionally, the inter-character spacing is weird. It sometimes writes characters overlapping each other. I noticed some repetition in the garbled text, so I typed a few of them into Google, and surprisingly got a lot of hits. Here is the string I searched for: pdf cjmp ebuf nftf up! The Google search summaries contain the garbled text. However, when I click on those links in Google, I get perfectly readable PDF files. It's as if Google's PDF crawler has the same bug. Has anyone figured this out? Is this an Acrobat Reader bug?

    Read the article

  • Finding Font Issues in Acrobat

    - by Jayme
    Ok let me try this again, so sorry for not be clear. We create our PDFs through Quark, then send to print. I usually create outlines on my EPS files before I load in Quark but forgot this time. We bypassed the font error that Quark gave us by accident and found out our PDF was bad too late and it cost a lot of money to fix. We are trying to find a way to check our PDF for font problems before we send it to print, in case this problem happens again. We just want to be extra sure that we have tried everything. What I see in Quark is what the font is supposed to look like. When I view my PDF, the text is mixed up. Its readable but doesn't look like its supposed to and the spacing is all off within the text. My boss told me about the preflight in Quark and the Internal Structure for the fonts. She was asking me if this would help and what the lingo all meant. (which is where my first question started) The image on the left is my EPS that is correct, the image on the right is from the PDF. The white text in the top right and the website at the bottom left is what is messed up. I am running Mac 10.5.8, Quark 7.5 and Acrobat 8.3.1. Thanks, Jayme

    Read the article

  • how to properly transfer user input from index to invoice?

    - by Romel
    I got a dillema, I'm trying to find a solution for my code. How do I make it so that when the user inputs a given quantity in the text box from the index.php it will transfer that input quantity to the invoice.php. I've tried doing the post method but it seems like it's not working :/ As always, any help or suggestions will be greatly appreciated! I hope it's something simple:( Here's my code: index.php <html> <style> body{ background-image: url('URL HERE'); font-family: "Helvetica"; font-size:15px; } h1{ color:black; text-align:center; } p{ font-size:15px; } </style> <h1> STORE TITLE HERE </h1> <body> <form action="login.php" method="post"> <?php //Include products info.inc (Which holds all our product arrays and info) //Credit: Tracy & Mark (THank you!) include 'products_info.inc'; /*The following code centers my table on the page, makes the table background white, makes the table 50% of the browser window, gives it a border of 1 px, gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells. */ echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1 cellspacing=2>"; //Credit: Tracy & Mark (THank you!) echo '<th>Product</th> <th>Description</th> <th>Price</th> <th>Quantity</th>'; //The following code loops through the whole table body and then prints each row. for($i=0; $i<count($allfood); $i++) { //Credit: Tracy & Mark (THank you!) echo "<tr align=center>"; echo "<td>{$allfood[$i]['Product']}</td>"; echo "<td>{$allfood[$i]['Description']}</td>"; echo "<td>{$allfood[$i]['Price']}</td>"; echo "<td>{$allfood[$i]['Quantity']}</td>"; echo "</tr>"; } //This code ends the table. echo "</table>"; echo "<br>"; ?> <br><center><input type='submit' name='purchase' value='Purchase'></center> </form> </body> </html> And here's my invoice.php <html> <style> body{ background-image: url('URL HERE'); font-family: "Helvetica"; font-size:15px; } h1{ color:black; text-align:center; } p{ font-size:15px; } </style> <h1> Invoice </h1> </html> <?php //Include products info.inc (Which holds all our product arrays and info) //Credit: Tracy & Mark (Thank you!) include 'products_info.inc'; //Display the invoice & 'WELCOME USER. THANK YOU FOR USING THIS DAMN THING msg' /*The following code centers my invoice table on the page, makes the table background white, makes the table 50% of the browser window, gives it a border of 1 px, gives a padding of 2 px between the cell border and content, and gives 1 px of spacing between cells. */ echo "<table align=center bgcolor='FFFFFF' width=50% border=1 cellpadding=1cellspacing=2>"; echo "<tr>"; echo "<td align=center><b>Product</b></td>"; echo "<td align=center><b>Quantity</b></td>"; echo "<td align=center><b>Price</></td>"; echo "<td align=center><b>Extended Price</b></td>"; echo "</tr>"; for($i=0; $i<count($allfood); $i++) { //Credit: Tracy & Mark (Thank you!) $qty= @$_POST['Quantity']['$i']; // This calculates the price if the user orders more than 1 item. $extendedprice = $qty*$allfood[$i]['Price']; echo "<tr>"; echo "<td align=center>{$allfood[$i]['Product']}</td>"; echo "<td align=center>$extendedprice</td>"; echo "<td align=center>{$allfood[$i]['Price']}</td>"; echo "</tr>"; } // The goal here was to make it so that if the user selected a certain quantity from index.php, it would carry over and display on the invoice.php if ($qty = 0) { echo "please choose 1"; } elseif ($qty > 0) { echo $qty; } /*echo "<tr>"; echo "<td align=center>Subtotal</b></td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; echo "<tr>"; echo "<td align=center>Tax at 5.75%</td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; echo "<tr>"; echo "<td align=center><b>Grand total</b></td>"; echo "<td align=center></td>"; echo "<td align=center></td>"; */ echo "</table>"; ?> <br> <center> <form action="index.php" method="post"> <input type="submit" name="home" value="Back to homepage"> </form> </center>

    Read the article

  • DESIGNING FOR WIN PHONE 7

    Designing applications for the Win Phone 7 is very similar to designing for print. In my opinion, it feels like a cross between a tri-fold brochure and a poster. I based my prototype designs on Microsofts Metro style guide, with typography as the main focus and stunning imagery for support. Its nice to have fixed factors regulating the design, making it a fun and fresh design experience. Microsoft provides a UI Design Guidelines document that outlines layout sizes, background image size, recommended typefaces and spacing. You know what you are designing for and you know how it will look and act on the win phone 7 platform. Although applications are not required to strictly adhere to the Metro style guide I feel it makes the best use of the panorama view  and navigation. With strong examples of this UI concept in place like their Zune-like music + videos hub, I found it fairly easy to put together a few quick app mockups (see below). In addition to design guidelines, using a ready built design templates, or a win phone 7 specific panorama control like the one by Clarity Consulting will make the process of bringing your designs to life much more efficient. Likes, Dislikes, and Challenges I think the idea of the hub is completely intuitive. This concept clearly breaks down info into more manageable pieces, and greatly helps with organization when designing for the phone. I like the chromeless appearance, allowing the core functionality of the application to take precedence over gradients, textures, bevels, drop shadows, and the complicated animations you see on the web. Although I understand the Win Phone 7 guidelines are a work in progress, I found a few contradictions. I also noticed that certain design specifications did not translate well to the phone emulator . If you use their guidelines as suggested best practices and not as fixed definitions you will have more success. Multi-directional vs Linear The main challenge I had was stepping away from familiar navigational examples seen in other mobile phones. I had to keep reminding myself that the content to the right and to the left of what I was working on didnt necessarily have to have a direct link to one another. I started thinking multi-directional as opposed to linear. Win phone 7 vs IPhone The Metro styling of the Win Phone 7 is similar to the Zune HD and the Windows Media Center UI and offers a different interface paradigm than the IPhone. When navigating an application it feels like you are panning a long seamless page of information in contrast to the multiple panels of an IPhone. I think there is less of an opportunity to overdesign your application, which happens often with IPhone applications. While both interfaces are simple and sleek, win phone 7 really gets down to the basics. IPhone sets a high standard for designing for touch, designing for win phone 7 could improve on that user experience with a consistent and strategic use of white space and staying away from a menu and icon heavy UI. Design Examples for Win Phone 7 Applications Here are some concepts for both generic and brand specific applications for Win Phone 7: View Full Album Resources to get you going with your own Win Phone 7 design: Helpful design templates for Win Phone 7  http://www.shazaml.com/archives/windows-phone-7-ui-templates Here is the interaction design guide for Win Phone 7 http://go.microsoft.com/?linkid=9713252 Windows has a project template for Blend 4 and Visual Studio 2010 RC1 http://developer.windowsphone.com/ Clarity Consulting developed a panorama control for Win Phone 7 http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspxDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • DESIGNING FOR WIN PHONE 7

    Designing applications for the Win Phone 7 is very similar to designing for print. In my opinion, it feels like a cross between a tri-fold brochure and a poster. I based my prototype designs on Microsofts Metro style guide, with typography as the main focus and stunning imagery for support. Its nice to have fixed factors regulating the design, making it a fun and fresh design experience. Microsoft provides a UI Design Guidelines document that outlines layout sizes, background image size, recommended typefaces and spacing. You know what you are designing for and you know how it will look and act on the win phone 7 platform. Although applications are not required to strictly adhere to the Metro style guide I feel it makes the best use of the panorama view  and navigation. With strong examples of this UI concept in place like their Zune-like music + videos hub, I found it fairly easy to put together a few quick app mockups (see below). In addition to design guidelines, using a ready built design templates, or a win phone 7 specific panorama control like the one by Clarity Consulting will make the process of bringing your designs to life much more efficient. Likes, Dislikes, and Challenges I think the idea of the hub is completely intuitive. This concept clearly breaks down info into more manageable pieces, and greatly helps with organization when designing for the phone. I like the chromeless appearance, allowing the core functionality of the application to take precedence over gradients, textures, bevels, drop shadows, and the complicated animations you see on the web. Although I understand the Win Phone 7 guidelines are a work in progress, I found a few contradictions. I also noticed that certain design specifications did not translate well to the phone emulator . If you use their guidelines as suggested best practices and not as fixed definitions you will have more success. Multi-directional vs Linear The main challenge I had was stepping away from familiar navigational examples seen in other mobile phones. I had to keep reminding myself that the content to the right and to the left of what I was working on didnt necessarily have to have a direct link to one another. I started thinking multi-directional as opposed to linear. Win phone 7 vs IPhone The Metro styling of the Win Phone 7 is similar to the Zune HD and the Windows Media Center UI and offers a different interface paradigm than the IPhone. When navigating an application it feels like you are panning a long seamless page of information in contrast to the multiple panels of an IPhone. I think there is less of an opportunity to overdesign your application, which happens often with IPhone applications. While both interfaces are simple and sleek, win phone 7 really gets down to the basics. IPhone sets a high standard for designing for touch, designing for win phone 7 could improve on that user experience with a consistent and strategic use of white space and staying away from a menu and icon heavy UI. Design Examples for Win Phone 7 Applications Here are some concepts for both generic and brand specific applications for Win Phone 7: View Full Album Resources to get you going with your own Win Phone 7 design: Helpful design templates for Win Phone 7  http://www.shazaml.com/archives/windows-phone-7-ui-templates Here is the interaction design guide for Win Phone 7 http://go.microsoft.com/?linkid=9713252 Windows has a project template for Blend 4 and Visual Studio 2010 RC1 http://developer.windowsphone.com/ Clarity Consulting developed a panorama control for Win Phone 7 http://blogs.claritycon.com/blogs/design/archive/2010/03/30/building-the-elusive-windows-phone-panorama-control.aspxDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Is inconsistent formatting a sign of a sloppy programmer?

    - by dreza
    I understand that everyone has their own style of programming and that you should be able to read other people's styles and accept it for what it is. However, would one be considered a sloppy programmer if one's style of coding was inconsistent across whatever standard they were working against? Some example of inconsistencies might be: Sometimes naming private variables with _ and sometimes not Sometimes having varying indentations within code blocks Not aligning braces up i.e. same column if using start using new line style Spacing not always consistent around operators i.e. p=p+1, p+=1 vs other times p =p+1 or p = p + 1 etc Is this even something that as a programmer I should be concerned with addressing? Or is it such a minor nit picking thing that at the end of the day I should just not worry about it and worry about what the end user sees and whether the code works rather than how it looks while working? Is it sloppy programming or just over obsessive nit picking? EDIT: After some excellent comments I realized I may have left out some information in my question. This question came about after reviewing another colleagues code check-in and noticing some of these things and then realizing that I've seen these kind of in-consistencies in previous check-ins. It then got me thinking about my code and whether I do the same things and noticed that I typically don't etc I'm not suggesting his technique is either bad or good in this question or whether his way of doing things is right or wrong. EDIT: To answer some queries to some more good feed back. The specific instance this review occurred in was using Visual Studio 2010 and programming in c# so I don't think the editor would cause any issues. In fact it should only help I would hope. Sorry if I left that piece of info out and it effects any current answers. I was trying to be a bit more generic in understanding if this would be considered sloppy etc. And to add an even more specific example of a code piece I saw during reading of the check-in: foreach(var block in Blocks) { // .. some other code in here foreach(var movement in movements) { movement.Moved.Zero(); } // the un-formatted brace } Such a minor thing I know, but many small things add up(???), and I did have to double glance at the code at the time to see where everything lined up I guess. Please note this code was formatted appropriately before this check-in. EDIT: After reading some great answers and varying thoughts, the summary I've taken from this was. It's not necessarily a sign of a sloppy programmer however as programmers we have a duty (to ourselves and other programmers) to make the code as readable as possible to assist in further ongoing development. However it can hint at inadequacies which is something that is only possible to review on a case by case (person by person) basis. There are many reasons why this might occur. They should be taken in context and worked through with the person/people involved if reasonable. We have a duty to try and help all programmers become better programmers! In the good old days when development was done using good old notepad (or other simple text editing tool) this occurred much more frequently. However we have the assistance of modern IDE's now so although we shouldn't necessarily become OTT about this, it should still probably be addressed to some degree. We as programmers vary in our standards, styles and approaches to solutions. However it seems that in general we all take PRIDE in our work and as a trait it is something that can stand programmers apart. Making something to the best of our abilities both internal (code) and external (end user result) goes along way to giving us that big fat pat on the back that we may not go looking for but swells our heart with pride. And finally to quote CrazyEddie from his post below. Don't sweat the small stuff

    Read the article

  • Math with Timestamp

    - by Knut Vatsendvik
    table.sql { border-width: 1px; border-spacing: 2px; border-style: dashed; border-color: #0023ff; border-collapse: separate; background-color: white; } table.sql th { border-width: 1px; padding: 1px; border-style: none; border-color: gray; background-color: white; -moz-border-radius: 0px 0px 0px 0px; } table.sql td { border-width: 1px; padding: 3px; border-style: none; border-color: gray; background-color: white; -moz-border-radius: 0px 0px 0px 0px; } .sql-keyword { color: #0000cd; background-color: inherit; } .sql-result { color: #458b74; background-color: inherit; } Got this little SQL quiz from a colleague.  How to add or subtract exactly 1 second from a Timestamp?  Sounded simple enough at first blink, but was a bit trickier than expected. If the data type had been a Date, we knew that we could add or subtract days, minutes or seconds using + or – sysdate + 1 to add one day sysdate - (1 / 24) to subtract one hour sysdate + (1 / 86400) to add one second Would the same arithmetic work with Timestamp as with Date? Let’s test it out with the following query SELECT   systimestamp , systimestamp + (1 / 86400) FROM dual; ---------- 03.05.2010 22.11.50,240887 +02:00 03.05.2010 The first result line shows us the system time down to fractions of seconds. The second result line shows the result as Date (as used for date calculation) meaning now that the granularity is reduced down to a second.   By using the PL/SQL dump() function, we can confirm this with the following query SELECT   dump(systimestamp) , dump(systimestamp + (1 / 86400)) FROM dual; ---------- Typ=188 Len=20: 218,7,5,4,8,53,9,0,200,46,89,20,2,0,5,0,0,0,0,0 Typ=13 Len=8: 218,7,5,4,10,53,10,0 Where typ=13 is a runtime representation for Date. So how can we increase the precision to include fractions of second? After investigating it a bit, we found out that the interval data type INTERVAL DAY TO SECOND could be used with the result of addition or subtraction being a Timestamp. Let’s try again our first query again, now using the interval data type. SELECT systimestamp,    systimestamp + INTERVAL '0 00:00:01.0' DAY TO SECOND(1) FROM dual; ---------- 03.05.2010 22.58.32,723659000 +02:00 03.05.2010 22.58.33,723659000 +02:00 Yes, it worked! To finish the story, here is one example showing how to specify an interval of 2 days, 6 hours, 30 minutes, 4 seconds and 111 thousands of a second. INTERVAL ‘2 6:30:4.111’ DAY TO SECOND(3)

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >