Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 18/433 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How to have mulptiple search keys using one filename

    - by user107020
    I have a database wherein the files are named abcd100.00b, abcd101.00b,..... i need a code where wen the user enters abcd separate then 100 to 110 . all the files with the name abcd and in the range 100 to 110 should get displayed now the following code can display pnly the first four characters how do i implement this?????? <?php //capture search term and remove spaces at its both ends if the is any $searchTerm = trim($_GET['keyname']) ; //check whether the name parsed is empty if($searchTerm == "rinex_file") { echo "Enter name you are searching for."; exit(); } if($searchTerm == "rinex_file") { echo "Enter name you are searching for."; exit(); } //database connection info $host = "localhost"; //server $db = "rinex"; //database name $user = "m"; //dabases user name $pwd = "c"; //password //connecting to server and creating link to database $link = mysqli_connect($host, $user, $pwd, $db); //MYSQL search statement $query = "SELECT * FROM rinexo WHERE rinex_file LIKE '%$searchTerm%'"; $results = mysqli_query($link, $query) ; /* check whethere there were matching records in the table by counting the number of results returned */ if(mysqli_num_rows($results) >= 1){ echo '<table border="1"> <tr> <th>rinex version</th> <th>program</th> <th>date</th> <th>maker name</th> <th>maker number</th> <th>observer</th> <th>agency</th> <th>position_X_Y_Z</th> </tr>'; while($row = mysqli_fetch_array($results)){ echo '<tr> <td>'.$row['rinex_version'].'</td> <td>'.$row['pgm'].'</td> <td>'.$row['date'].'</td> <td>'.$row['marker_name'].'</td> <td>'.$row['marker_no'].'</td> <td>'.$row['observer'].'</td> <td>'.$row['agency'].'</td> <td>'.$row['position_X_Y_Z'].'</td> </tr>'; } echo '</table>'; }else{ echo "There was no matching record for the name " . $searchTerm; }

    Read the article

  • SQL SERVER – Create Primary Key with Specific Name when Creating Table

    - by pinaldave
    It is interesting how sometimes the documentation of simple concepts is not available online. I had received email from one of the reader where he has asked how to create Primary key with a specific name when creating the table itself. He said, he knows the method where he can create the table and then apply the primary key with specific name. The attached code was as follows: CREATE TABLE [dbo].[TestTable]( [ID] [int] IDENTITY(1,1) NOT NULL, [FirstName] [varchar](100) NULL) GO ALTER TABLE [dbo].[TestTable] ADD  CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID] ASC) GO He wanted to know if we can create Primary Key as part of the table name as well, and also give it a name at the same time. Though it would look very normal to all experienced developers, it can be still confusing to many. Here is the quick code that functions as the above code in one single statement. CREATE TABLE [dbo].[TestTable]( [ID] [int] IDENTITY(1,1) NOT NULL, [FirstName] [varchar](100) NULL CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ([ID] ASC) ) GO Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, Readers Question, SQL, SQL Authority, SQL Constraint and Keys, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • SQL SERVER – GUID vs INT – Your Opinion

    - by pinaldave
    I think the title is clear what I am going to write in your post. This is age old problem and I want to compile the list stating advantages and disadvantages of using GUID and INT as a Primary Key or Clustered Index or Both (the usual case). Let me start a list by suggesting one advantage and one disadvantage in each case. INT Advantage: Numeric values (and specifically integers) are better for performance when used in joins, indexes and conditions. Numeric values are easier to understand for application users if they are displayed. Disadvantage: If your table is large, it is quite possible it will run out of it and after some numeric value there will be no additional identity to use. GUID Advantage: Unique across the server. Disadvantage: String values are not as optimal as integer values for performance when used in joins, indexes and conditions. More storage space is required than INT. Please note that I am looking to create list of all the generic comparisons. There can be special cases where the stated information is incorrect, feel free to comment on the same. Please leave your opinion and advice in comment section. I will combine a final list and update this blog after a week. By listing your name in post, I will also give due credit. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Constraint and Keys, SQL Data Storage, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology

    Read the article

  • In Ubuntu 13.10, none of the hotkeys of LibreOffice works in non-English keyboard layout

    - by maqtanim
    In Ubuntu 13.10, the hotkeys/shortcut-keys (Ctrl+b, Ctrl+s etc) in LibreOffice are language dependent and work in English language only. While writing in any other language (i.e. any Cyrillic and/or any Bengali etc) it's impossible to use hotkeys, they just don't do anything. Switching to English input language enable hotkeys once again. This is very frustrating as user needs to switch language to save document, to make it bold, or italic, etc. This was not experienced in Ubuntu 13.04. Steps to reproduce: System Settings Text Entry. Add another keyboard layout beside English [In my case it is Bengali (Probhat)] Now launch Writer. Switch the keyboard layout from English (US) to Bengali (Probhat) by pressing Ctrl+Space. Press Ctrl+B to change font weight to bold. Error: Font weight does not get changed. Expected: Font weight should change to bold. Note: none other system hotkeys work as expected. I.e. Ctrl+s to save, or Ctrl+b to subscript, or Ctrl+i to italic etc. Workaround: The only way is to - change the keyboard layout to English then press desired hotkey then switch keyboard layout back to Bengali. The issue is critical, as it make writer very slow for keyboard-only typing.

    Read the article

  • Keyboard-shortcut key-press-detection sensitivity settings

    - by Juve
    last week I switched from Ubuntu 10.10 to 12.04 and after setting up my keyboard shortcuts, e.g., CTRL+ALT+E for my favorite editor and CTRL+ALT+X for the terminal, I noticed that the behavior when pressing the appropriate keys changed somehow. I know this is very subjective and I am not 100% percent sure if I am suddenly just too lazy when using my keyboard, but here is what I noticed: To run your shortcuts, you usually press the modifiers first and in addition press the alphanum key. Now, if I hold the modifiers down very consciously and press the alphanum key afterwards everything works fine. However, I noticed that I may often release the modifiers a bit too early. In Ubuntu 10.10 (metacity/compiz) my keyboard shortcuts would still execute and my tools would pop up. This does not work anymore in 12.04. Nevertheless, I still believe the old behavior to be more intuitive and would like to have it back. I a nutshell: Is there a parameter to control the shortcut-key-press detection behavior? I already searched the ubuntu keyboard options and searched for "keyboard" in gconf-editor but could not find any hints so far.

    Read the article

  • New to emacs -- my key bindings are different from what is described in the tutorials. How to fix this?

    - by MountainX
    I'm using emacs v24 [GNU Emacs 24.0.94.1 (x86_64-pc-linux-gnu, GTK+ Version 3.3.20) of 2012-03-26 on meitnerium, modified by Debian] on Kubuntu 12.04. My basic problem is that emacs is not behaving the same as the tutorials I'm reading. I either need different tutorials or I need to make my emacs work as described in the tutorials. Being new to emacs and KDE, I don't know where to start because of this incongruence. My specific problem is this: When I shift-left-mouse-click, I get a buffer dialog popup. That differs from my understanding of the documenation: shift mouse-1 Draws lines, rectangles or poly-lines, erases, cuts, copies or pastes. I also want to use CUA mode. The CUA mode documents seem to indicate that shift-left-mouse-click produces: rectangle highlighting by dragging the mouse while holding down the shift key. I don't get that result either. In fact, I can't select using any modifier keys together with a drag action. Maybe this is a KDE issue. I don't know.

    Read the article

  • Enable [command] key to register as something other than just [ctrl]?

    - by gojomo
    I'm running 10.04LTS inside VMWare Fusion on a Mac. The [command] key (aka [windows] on many keyboards) is almost always behaving as if it was [ctrl], even though I done anything explicit to request that behavior. In fact, in SystemPreferencesKeyboardLayoutsOptionsAlt/Win key behavior, 'default' is chosen (rather than the 'Control is mapped to Win keys' option). However, choosing other options there do not seem to change the handling of [command], at least not as tested in the SystemPreferenceKeyboard Shortcuts app. (No matter what I've tried, [command]-x is always detected as [Ctrl]-x in that app.) I've tried: various options under SystemPreferencesKeyboardLayoutsOptionsAlt/Win key behavior toggling the VMWare Fusion Preferences KKeyboard & Mouse Key Mappings setup which claims to map '[command]' to '[windows]', and restarting the VM in each position the xmodmap lines suggested at https://help.ubuntu.com/community/MappingWindowsKey And yet, it's clear that all Ubuntu apps aren't merging [ctrl] and [command], because in 'Terminal', [shift]-[ctrl]-c will Copy, but [shift]-[command]-c will not. If the [command]/[windows] key was recognized as anything else ('Super', 'Meta', 'Hyper'? I don't care as long as it's not 'Control'), then I could achieve my real goal (which happens to be enabling CMD-based cut/copy/paste in PyCharm, while leaving CTRL-X/etc available for emacs-like bindings). I think any solution which manages to make [command]-x appear as something other than [ctrl]-x in PreferencesKeyboard Shortcuts will probably do the trick.

    Read the article

  • Ubuntu 12.10 hotkeys not working properly [closed]

    - by Sly
    A couple of weeks ago, I ran a distribution upgrade from 12.04 to 12.10. Unfortunately, something has seemed to happen with the hotkeys on the system. At first, I thought that maybe this was just a glitch with the global hotkeys. That didn't turn out to be the case, as the custom hotkey I added into the Ubuntu settings works for my editor. The only default hotkey that seems to have a problem launching is CTRL+ALT+T (Terminal). This wasn't such a big issue to begin with, because I can always just drag the Terminal to my launcher and launch it from there. However, I was on Chrome earlier and tried to do SHIFT+CTRL+DEL to clear the history and it failed. I then tried to do SHIFT+ESC, just to see if the hotkey for the task manager would work.. and it did. I also thought it could be something with the "CTRL" key, since SHIFT+ESC works, but SHIFT+CTRL+DEL doesn't. That didn't turn out to be the case either, as keys like CTRL+ALT+DEL (logout) work perfectly fine. Not quite sure how to go about this, and I haven't found any errors in any of /var/log that raises any suspicion.

    Read the article

  • Is man-in-the-middle attack a security threat during SSH authentication using keys?

    - by JP19
    Hi, I am no expert in network security, so pardon if this question is not very smart :). I am automating logins to some machines using ssh. I am currently avoiding host-key warnings using StrictHostKeyChecking no. I naively understand that someone can impersonate as the server and I risk losing my password to him if that were the case. However, if I am using only public/private Key based authentication ( using PasswordAuthentication no ), can the intruder still cause harm? So basically, with ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" : 1) Can the intruder decipher my private key? 2) Are there any other security threats? regards, JP

    Read the article

  • How do you get an asp.net control's auto generated name attribute?

    - by Petras
    I have a DropDownList and need to know its name in the code behind: <select name="ctl00$cphMainContent$ddlTopic" onchange="javascript:setTimeout('__doPostBack(\'ctl00$cphMainContent$ddlTopic\',\'\')', 0)" id="ctl00_cphMainContent_ddlTopic"> <option value="All">All</option> </select> I need to get the value "ctl00$cphMainContent$ddlTopic" Is that possible?

    Read the article

  • Why is django admin not accepting Nullable foreign keys?

    - by p.g.l.hall
    Here is a simplified version of one of my models: class ImportRule(models.Model): feed = models.ForeignKey(Feed) name = models.CharField(max_length=255) feed_provider_category = models.ForeignKey(FeedProviderCategory, null=True) target_subcategories = models.ManyToManyField(Subcategory) This class manages a rule for importing a list of items from a feed into the database. The admin system won't let me add an ImportRule without selecting a feed_provider_category despite it being declared in the model as nullable. The database (SQLite at the moment) even checks out ok: >>> .schema ... CREATE TABLE "someapp_importrule" ( "id" integer NOT NULL PRIMARY KEY, "feed_id" integer NOT NULL REFERENCES "someapp_feed" ("id"), "name" varchar(255) NOT NULL, "feed_provider_category_id" integer REFERENCES "someapp_feedprovidercategory" ("id"), ); ... I can create the object in the python shell easily enough: f = Feed.objects.get(pk=1) i = ImportRule(name='test', feed=f) i.save() ...but the admin system won't let me edit it, of course. How can I get the admin to let me edit/create objects without specifying that foreign key?

    Read the article

  • Rebinding Keys on a Dell Keyboard

    - by Maarx
    I have a Dell Multimedia Keyboard, similar to this one: It has many non-standard keys, like the small circular ones across the top, and the "Multimedia" keys above INSERT/HOME/PAGE_UP. They can be rebound through simple registry entries. Some sample ones are included below: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\15] "ShellExecute"="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe http://mail.google.com/mail/#inbox" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\16] "Association"=".cda" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17] "ShellExecute"="C:\\Windows\\System32\\SnippingTool.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18] "ShellExecute"="calc.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\7] "Association"="http" I've rebound the "MAIL" key to, instead of booting Outlook, to booting Firefox directed at my G-Mail account. I've rebound the button that would normally open "MY COMPUTER" to instead boot the Windows 7 "Snipping Tool", something I find very useful. Now, I'm looking to do some other things that I don't already know how to do. Note that answering this question doesn't necessarily require any knowledge about the keyboard or rebinding the keys: I can add, for any given key, a "ShellExecute" entry, and it will simply execute the following command as if it was typed at a Command Prompt. (I'm aware I dumbed that down rather significantly, but bear with me. I'm not really a Windows guy myself.) I use the volume knob for it's intended purpose, to change volume. I would like to change, however, a different key, to "reset" the Windows volume level back to exactly 50%, or, as it refers to it, "50", on it's 0-100 scale. I'm looking for the "program" (what I would type at a command prompt? these are still just Sys32 programs in the PATH, aren't they?) that, I imagine, would take arguments, to change Sound/Volume settings under Windows 7. Perhaps, for clarification, something that might take the form "C: SetVolume -slevel 50" or something.

    Read the article

  • Script to unstick VNC keys?

    - by MidnightLightning
    I've run into dropped key events when connecting via VNC clients, leading to a "stuck key" (usually a meta key like CTRL or ALT) and searching around the common answer on how to solve it is often "press and release each meta key individually until the problem resolves". However, I've found this to be annoying and time consuming to try and solve it this way. Plus on a bad connection, it sometimes will miss the "key up" event for the meta key again, and still keep the key stuck. So I'm looking for an automated way to do this: From a script on the client side or the server side, is there a way to trigger "key up" events for all the meta keys (CTRL, ALT, SHIFT, and WIN/CMD, both Left and Right versions)? Or just a command to release all keys the server thinks are down at the moment? Or some scripted way to at least list which keys the server end thinks are down so I know which key to keep pressing and releasing to try and release it? I've got a Mac on the server end, so a Mac/Linux solution would be needed for my situation.

    Read the article

  • Understanding encryption Keys

    - by claws
    Hello, I'm really embarrassed to ask this question but its the fact that I don't know anything about encryption. I always avoided it. I don't understand the concept of encryption keys (public key, private key, RSA key, DSA key, PGP Key, SSH key & what not) . I did encounter these in regular basis but as I said I always avoided them. Here are few instances where I encountered: Creating Account: A public RSA or DSA key will be needed for an account. Send the key along with your desired account name to [email protected] I really don't know what are RSA/DSA or How to get their keys? Do I need to register some where for that? Mailing: I'm unable to recall exactly but I've seen some mails have some attachments like signature or the mail footer will have something called PGP signature etc.. I really don't get its concept. GIT Version control: I created account in assembla.com (for private GIT repo) and it asked me to enter "SSH keys" to my profile. Where am I gonna get these? Why do I need it? Isn't SSH related to remote login (like remote desktop or telnet)? How are these two SSHs related & differ? I don't know in how many more situations I'm going to encounter these things. I'm really confused and have no clue about where to start & how to proceed to learn these things. Kindly someone point me in correct direction. Note: I've absolutely zero interested in encryption related topics. So, there is no way I'm going to read a graduate level book on this subject. I just want to clear my concepts without going into much depth.

    Read the article

  • Unix sort 10x slower with keys specified

    - by KenFar
    My data: It's a 71 MB file with 1.5 million rows. It has 6 fields, four of which are strings of avg. 15 characters, two are integers. Three of the fields are sometimes empty. All six fields combine to form a unique key - and that's what I need to sort on. Sort statement: sort -t ',' -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 -k6,6 -o a_out.csv a_in.csv The problem: If I sort without keys, it takes 30 seconds. If I sort with keys, it takes 660 seconds. I need to sort with keys to keep this generic and useful for other files that have non-key fields as well. The 30 second timing is fine, but the 660 is a killer. I could theoretically move the temp directory to SSD, and/or split the file into 4 parts, sort them separately (in parallel) then merge the results, etc. But I'm hoping for something simpler since these results are so bad as-is. Any suggestions?

    Read the article

  • Navigating to nodes using xpath in flat structure

    - by James Berry
    I have an xml file in a flat structure. We do not control the format of this xml file, just have to deal with it. I've renamed the fields because they are highly domain specific and don't really make any difference to the problem. <attribute name="Title">Book A</attribute> <attribute name="Code">1</attribute> <attribute name="Author"> <value>James Berry</value> <value>John Smith</value> </attribute> <attribute name="Title">Book B</attribute> <attribute name="Code">2</attribute> <attribute name="Title">Book C</attribute> <attribute name="Code">3</attribute> <attribute name="Author"> <value>James Berry</value> </attribute> Key things to note: the file is not particularly hierarchical. Books are delimited by an occurance of an attribute element with name='Title'. But the name='Author' attribute node is optional. Is there a simple xpath statement I can use to find the authors of book 'n'? It is easy to identify the title of book 'n', but the authors value is optional. And you can't just take the following author because in the case of book 2, this would give the author for book 3. I have written a state machine to parse this as a series of elements, but I can't help thinking there would have been a way to directly get the results that I want.

    Read the article

  • C#: Accessing a Dictionary.Keys Key through a numeric index

    - by Michael Stum
    I'm using a Dictionary<string, int> where the int is a count of the key. Now, I need to access the last-inserted Key inside the Dictionary, but i do not know the name of it. The obvious attempt: int LastCount = mydict[mydict.keys[mydict.keys.Count]]; does not work, because Dictionary.Keys does not implement a []-indexer. I just wonder if there is any similar class? I thought about using a Stack, but that only stores a string. I could now create my own struct and then use a Stack<MyStruct>, but I wonder if there is another alternative, essentially a Dictionary that implements an []-indexer on the Keys?

    Read the article

  • Spring - adding BindingResult to newly created model attribute

    - by Max
    My task is - to create a model attribute by given request parameters, to validate it (in same method) and to give it whole to the View. I was given this code: //Create the model attribute by request parameters Promotion promotion = Promotions.get(someRequestParam); //Add the attribute to the model modelMap.addAttribute("promotion", promotion); if (!promotion.validate()) { BindingResult errors = new BeanPropertyBindingResult(promotion, "promotion"); errors.reject("promotion.invalid"); //TODO: This is the part I don't like model.put(BindingResult.MODEL_KEY_PREFIX + "promotion", errors); } This thing sure works, but that part with creating key with MODEL_KEY_PREFIX and attribute name looks very hackish and not a Spring style to me. Is there a way to make the same thing prettier?

    Read the article

  • Using reflection to retrieve constructor used to instantiate attribute

    - by summatix
    How can I retrieve information about how an attribute was instantiated? Consider I have the following class definitions: [AttributeUsage(AttributeTargets.Class)] public class ExampleAttribute : Attribute { public ExampleAttribute(string value) { Value = value; } public string Value { get; private set; } } [ExampleAttribute("test")] public class Test { } The new .NET 4.0 MemberInfo.GetCustomAttributesData method: foreach (var attribute in typeof(Test).GetCustomAttributesData()) { Console.WriteLine(attribute); } outputs [Example.ExampleAttribute("test")]. Is there another way to retrieve this same information, preferably using the MemberInfo.GetCustomAttributes method?

    Read the article

  • Test existence of xml attribute in as3

    - by matb
    Hi, What is the best method to test the existence of an attribute on an XML object in ActionScript 3 ? http://martijnvanbeek.net/weblog/40/testing_the_existance_of_an_attribute_in_xml_with_as3.html is suggesting to test using if ( node.@test != node.@nonexistingattribute ) and I saw comments suggesting to use: if ( node.hasOwnProperty('@test')) { // attribute qtest exists } But in both case, tests are case sensitive. From the XML Specs : "XML processors should match character encoding names in a case-insensitive way" so I presume attribute name should also be match using a case-insensitive comparison. Thank you

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >