Search Results

Search found 42242 results on 1690 pages for 'function keys'.

Page 8/1690 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Foreign keys - temporarily bypass?

    - by Industrial
    Hi, I have just started to learn about the pros of foreign keys in database design (mySQL / innoDB) and I wonder if there's any way to temporarily bypass the foreign key when doing a specific delete query, to just delete in the parent table, and not from the linked child tables. Thanks

    Read the article

  • Getting macro keys from a razer blackwidow to work on linux

    - by Journeyman Geek
    I picked up a razer blackwidow ultimate that has additional keys meant for macros that are set using a tool that's installed on windows. I'm assuming that these arn't some fancypants joojoo keys and should emit scancodes like any other keys. Firstly is there a standard way to check these scancodes in linux? Secondly how do i set these keys to do things in command line and x based linux setups? My current linux install is xubuntu 10.10, but i'll be switching to kubuntu once i have a few things fixed up. Ideally the answer should be generic and system-wide Things i have tried so far: showkeys from the built in kbd package (in a seperate vt) - macro keys not detected xev - macro keys not detected lsusb and evdev output this ahk script's output suggests the M keys are not outputting standard scancodes Things i need to try snoopy pro + reverse engineering (oh dear) Wireshark - preliminary futzing around seems to indicate no scancodes emitted when what i seem to think is the keyboard is monitored and keys pressed. Might indicate additional keys are a seperate device or need to be initialised somehow. Need to cross reference that with lsusb output from linux, in 3 scenarios - standalone, passed through to a windows VM without the drivers installed, and the same with. LSUSB only detects one device on a standalone linux install It might be useful to check if the mice use the same razer synapse driver , since that means some variation of razercfg might work (not detected. only seems to work for mice) Things i have Have worked out: In a windows system with the driver, the keyboard is seen as a keyboard and a pointing device. And said pointing device uses, in addition to your bog standard mouse drivers.. a driver for something called a razer synapse. Mouse driver seen in linux under evdev and lsusb as well Single Device under OS X apparently, though i have yet to try lsusb equivilent on that Keyboard goes into pulsing backlight mode in OS X upon initialisation with the driver. This should probably indicate that there's some initialisation sequence sent to the keyboard on activation. They are, in fact, fancypants joojoo keys. Extending this question a little I have access to a windows system so if i need to use any tools on that to help answer the question, its fine. I can also try it on systems with and without the config utility. The expected end result is still to make those keys usable on linux however. I also realise this is a very specific family of hardware. I would be willing to test anything that makes sense on a linux system if i have detailed instructions - this should open up the question to people who have linux skills, but no access to this keyboard The minimum end result i require I need these keys detected, and usable in any fashion on any of the current graphical mainstream ubuntu varients

    Read the article

  • Excel VBA Function runtime error 1004: Application-defined or object-defined error

    - by music2myear
    I'm trying to learn functions for the purpose of simplifying and reusing code whenever necessary. I began by turning something I use pretty often into a function: Returning the integer value of the last non-blank row in a spreadsheet. Function FindLastDataLine(strColName As String) As Long FindLastDataLine = Range(strColName).Offset(Rows.Count - 1, 0).End(xlUp).Row End Function Sub PracticeMacro() intItemCount = FindLastDataLine("A:A") MsgBox ("There are " & intItemCount & " rows of data in column A.") End Sub When I run this I recieve the runtime error '1004' "Application-defined or object-defined error" which Help helpfully defines as "someone else's fault" to quote not quite verbatim. Where might I be going wrong?

    Read the article

  • Managing multiple ssh keys

    - by Mathijs Kwik
    I have a lot of ssh keys, they are all passphrase protected and managed by ssh-agent. As a result of this, I am now getting "Too many authentication failures" on some connections. As has been explained on this site before, this is because ssh will try all keys the agent throws at it. The proposed solution is to use IdentitiesOnly in the config, together with an IdentityFile. While this indeed stops offering wrong keys, it seems it completely disables the agent in full, so now I have to type the passphrase on every connection. I could not find clear info about this. Does IdentitiesOnly just disable getting keys from ssh-agent in full? Or should it just block out the keys that aren't mentioned? Thanks, Mathijs # here's my config ~% cat .ssh/config Host bluemote HostName some.host.com IdentitiesOnly yes IdentityFile /home/mathijs/.ssh/keys/bluebook_ecdsa # I had the key loaded into the agent, shown here ~% ssh-add -L ecdsa-sha2-nistp521 SOME_LONG_BASE64_NUMBER== /home/mathijs/.ssh/keys/bluebook_ecdsa # but it doesn't seem to get used ~% ssh bluemote Enter passphrase for key '/home/mathijs/.ssh/keys/bluebook_ecdsa':

    Read the article

  • I want to use blur function instead mouseup function

    - by yossi
    I have the Demo Table which I can click on the cell(td tag) and I can change the value on it.direct php DataBase. to do that I need to contain two tags.1 - span. 2 - input. like the below. <td class='Name'> <span id="spanName1" class="text" style="display: inline;"> Somevalue </span> <input type="text" value="Somevalue" class="edittd" id="inputName1" style="display: none; "> </td> to control on the data inside the cell I use in jquery .mouseup function. mouseup work but also make truble. I need to replace it with blur function but when I try to replace mouseup with blur the program thas not work becose, when I click on the cell I able to enter the input tag and I can change the value but I can't Successful to Leave the tag/field by clicking out side the table, which alow me to update the DataBase you can see that Demo with blur Here. what you advice me to do? $(".edittd").mouseup(function() { return false; }); //************* $(document).mouseup(function() { $('#span' + COLUME + ROW).show(); $('#input'+ COLUME + ROW ).hide(); VAL = $("#input" + COLUME + ROW).val(); $("#span" + COLUME + ROW).html(VAL); if(STATUS != VAL){ //******ajax code //dataString = $.trim(this.value); $.ajax({ type: "POST", dataType: 'html', url: "./public/php/ajax.php", data: 'COLUME='+COLUME+'&ROW='+ROW+'&VAL='+VAL, //{"dataString": dataString} cache: false, success: function(data) { $("#statuS").html(data); } }); //******end ajax $('#statuS').removeClass('statuSnoChange') .addClass('statuSChange'); $('#statuS').html('THERE IS CHANGE'); $('#tables').load('TableEdit2.php'); } else { //alert(DATASTRING+'status not true'); } });//End mouseup function I change it to: $(document).ready(function() { var COLUMES,COLUME,VALUE,VAL,ROWS,ROW,STATUS,DATASTRING; $('td').click(function() { COLUME = $(this).attr('class'); }); //**************** $('tr').click(function() { ROW = $(this).attr('id'); $('#display_Colume_Raw').html(COLUME+ROW); $('#span' + COLUME + ROW).hide(); $('#input'+ COLUME + ROW ).show(); STATUS = $("#input" + COLUME + ROW).val(); }); //******************** $(document).blur(function() { $('#span' + COLUME + ROW).show(); $('#input'+ COLUME + ROW ).hide(); VAL = $("#input" + COLUME + ROW).val(); $("#span" + COLUME + ROW).html(VAL); if(STATUS != VAL){ //******ajax code //dataString = $.trim(this.value); $.ajax({ type: "POST", dataType: 'html', url: "./public/php/ajax.php", data: 'COLUME='+COLUME+'&ROW='+ROW+'&VAL='+VAL, //{"dataString": dataString} cache: false, success: function(data) { $("#statuS").html(data); } }); //******end ajax $('#statuS').removeClass('statuSnoChange') .addClass('statuSChange'); $('#statuS').html('THERE IS CHANGE'); $('#tables').load('TableEdit2.php'); } else { //alert(DATASTRING+'status not true'); } });//End mouseup function $('#save').click (function(){ var input1,input2,input3,input4=""; input1 = $('#input1').attr('value'); input2 = $('#input2').attr('value'); input3 = $('#input3').attr('value'); input4 = $('#input4').attr('value'); $.ajax({ type: "POST", url: "./public/php/ajax.php", data: "input1="+ input1 +"&input2="+ input2 +"&input3="+ input3 +"&input4="+ input4, success: function(data){ $("#statuS").html(data); $('#tbl').hide(function(){$('div.success').fadeIn();}); $('#tables').load('TableEdit2.php'); } }); }); }); Thx

    Read the article

  • How do you assign commands to keys in Terminal?

    - by NES
    Is there a solution to assign special key combinations to words in terminal use. For example the less command is very usefull and i use i a lot to pipe the output of another process through it. The idea would be to set up special key combinations that are only active in terminal use assigned to write different commands? So pressing CTRL + l in terminal window could write | less or CTRL + G could stand for | grep Note: i just mean adding the letters to commandline not execute the finally. A similar way what's tabcompletion but more specific.

    Read the article

  • Why do the Escape and Enter keys not always do the right thing in dialog boxes?

    - by Michael Goldshteyn
    Why is it that when a dialog pops up, the Escape key doesn't always cancel it and the Enter key doesn't always press the default button? Shouldn't this be a standard across all dialog boxes in all applications? I have gotten into the habit of pressing Escape to cancel a dialog and Enter to confirm it, but applications (and especially KDE, GNOME and Unity in many many cases) seem to ignore my wishes. What is the problem? Is consitency too much to ask?

    Read the article

  • How do you assign commands to keys to in Terminal?

    - by NES
    Is there a solution to assign special key combinations to words in terminal use. For example the less command is very usefull and i use i a lot to pipe the output of another process through it. The idea would be to set up special key combinations that are only active in terminal use assigned to write different commands? So pressing CTRL + l in terminal window could write | less or CTRL + G could stand for | grep Note: i just mean adding the letters to commandline not execute the finally. A similar way what's tabcompletion but more specific.

    Read the article

  • linq to sql using foreign keys returning iqueryable(of myEntity]

    - by Gern Blandston
    I'm trying to use Linq to SQL to return an IQueryable(of Project) when using foreign key relationships. Using the below schema, I want to be able to pass in a UserId and get all the projects created for the company the user is associated with. DB tables: Projects Projid ProjCreator FK (UserId from UserInfo table) Companyid FK (CompanyID from Companies table) UserInfo UserID PK Companyid FK Companies CompanyId PK Description I can get the iqueryable(of project) when simply getting the ProjectCreator with this: Return (From p In db.Projects _ Where p.ProjectCreator = Me.UserId) But I'm having trouble getting the syntax to get a iqueryable(of projects) when using foreign keys. Below gives me an IQueryable(of anonymous) but I can't seem to convince it to give me an IQueryable(of project) even if I try to cast it: Dim retval = (From p In db.Projects _ Join c In db.Companies On p.CompanyId Equals c.CompanyId _ Join u In db.UserInfos On u.CompanyId Equals c.CompanyId _ Where u.Login = UserId)

    Read the article

  • MySQL Removing Some Foreign keys

    - by Drew
    I have a table whose primary key is used in several other tables and has several foreign keys to other tables. CREATE TABLE location ( locationID INT NOT NULL AUTO_INCREMENT PRIMARY KEY ... ) ENGINE = InnoDB; CREATE TABLE assignment ( assignmentID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, locationID INT NOT NULL, FOREIGN KEY locationIDX (locationID) REFERENCES location (locationID) ... ) ENGINE = InnoDB; CREATE TABLE assignmentStuff ( ... assignmentID INT NOT NULL, FOREIGN KEY assignmentIDX (assignmentID) REFERENCES assignment (assignmentID) ) ENGINE = InnoDB; The problem is that when I'm trying to drop one of the foreign key columns (ie locationIDX) it gives me an "ERROR 1025 (HY000): Error on rename" error. How can I drop the column in the assignment table above without getting this error?

    Read the article

  • Multiple foreign keys from one table linking to single primary key in second table

    - by croker10
    Hi all, I have a database with three tables, a household table, an adults table and a users table. The Household table contains two foreign keys, iAdult1ID and iAdult2ID. The Users table has a iUserID primary key and the Adult table has a corresponding iUserID foreign key. One of the columns in the Users table is strUsername, an e-mail address. I am trying to write a query that will allow me to search for an e-mail address for either adult that has a relation to the household. So I have two questions, assuming that all the values are not null, how can I do this? And two, in reality, iAdult2ID can be null, is it still possible to write a query to do this? Thanks for your help. Let me know if you need any more information.

    Read the article

  • Multiple Foriegn Keys from One Table linking to single Primary Key in second Table

    - by croker10
    Hi all, I have a database with three tables, a household table, an adults table and a users table. The Household table contains two foreign keys, iAdult1ID and iAdult2ID. The Users table has a iUserID primary key and the Adult table has a corresponding iUserID foreign key. One of the columns in the Users table is strUsername, an e-mail address. I am trying to write a query that will allow me to search for an e-mail address for either adult that has a relation to the household. So I have two questions, assuming that all the values are not null, how can I do this? And two, in reality, iAdult2ID can be null, is it still possible to write a query to do this? Thanks for your help. Let me know if you need any more information.

    Read the article

  • MySQL whats wrong with my foreign keys?

    - by Skiy
    Hello, what is wrong with the two foreign keys which I have marked with comments? create database db; use db; create table Flug( Flugbez varchar(20), FDatum Date, Ziel varchar(20), Flugzeit int, Entfernung int, Primary Key (Flugbez, FDatum)); create table Flugzeugtyp( Typ varchar(20), Hersteller varchar(20), SitzAnzahl int, Reisegeschw int, primary key (Typ) ); create table flugzeug( Typ varchar(20), SerienNr int, AnschDatum Date, FlugStd int, primary key(Typ,SerienNr), foreign key(Typ) references Flugzeugtyp(Typ)); create table Abflug( Flugbez varchar(20), FDatum Date, Typ varchar(20), Seriennr int, Kaptaen varchar(20), Primary key(Flugbez,FDatum,Typ,SerienNr), Foreign key(Flugbez) references Flug(Flugbez), -- Foreign key(FDatum) references Flug(FDatum), Foreign key(Typ) references Flugzeugtyp(Typ) -- ,Foreign key(SerienNr) references Flugzeug(SerienNr) ); When I uncomment these, I get: ERROR 1005 (HY000): Can't create table 'db.abflug' (errno: 150)

    Read the article

  • VBA Public Function to Excel

    - by Sugih
    Dear sir , I have create below function Option Explicit Public Function fyi(x As Double, f As String) As String Application.Volatile Dim data As Double Dim post(5) post(1) = "Ribu " post(2) = "Juta " post(3) = "Milyar " post(4) = "Trilyun " post(5) = "Ribu Trilyun " Dim part As String Dim text As String Dim cond As Boolean Dim i As Integer If (x < 0) Then fyi = " " Exit Function End If If (x = 0) Then fyi = "Nol" Exit Function End If If (x < 2000) Then cond = True End If text = " " If (x >= 1E+15) Then fyi = "Nilai Terlalu Besar" Exit Function End If For i = 4 To 1 Step -1 data = Int(x / (10 ^ (3 * i))) If (data 0) Then part = fyis(data, cond) text = text & part & post(i) End If x = x - data * (10 ^ (3 * i)) Next text = text & fyis(x, False) fyi = text & f End Function Function fyis(ByVal y As Double, ByVal conds As Boolean) As String Dim datas As Double Dim posts(2) posts(1) = "Puluh" posts(2) = "Ratus" Dim parts As String Dim texts As String 'Dim conds As Boolean Dim j As Integer Dim value(9) value(1) = "Se" value(2) = "Dua " value(3) = "Tiga " value(4) = "Empat " value(5) = "Lima " value(6) = "Enam " value(7) = "Tujuh " value(8) = "Delapan " value(9) = "Sembilan " texts = " " For j = 2 To 1 Step -1 datas = Int(y / 10 ^ j) If (datas 0) Then parts = value(datas) If (j = 1 And datas = 1) Then y = y - datas * 10 ^ j If (y = 1) Then posts(j) = "belas" Else value(y) = "Se" End If texts = texts & value(y) & posts(j) fyis = texts Exit Function Else texts = texts & parts & posts(j) End If End If y = y - datas * 10 ^ j Next If (conds = False) Then value(1) = "Satu " End If texts = texts & value(y) fyis = texts End Function but when I return to Excel and type '=fyi(500,"USD") it return to #name? please do me favor to inform me how to solve Rgds, Sugih

    Read the article

  • "Decompile" Javascript function? *ADVANCED*

    - by caesar2k
    [1] Ok, I don't even know how to call this, to be honest. So let me get some semi-pseudo code, to show what I'm trying to do. I'm using jquery to get an already existing script declared inside the page, inside a createDocument() element, from an AJAX call. GM_xmlhttprequest({ ... load:function(r){ var doc = document_from_string(r.responseText); script_content = $('body script:regex(html, local_xw_sig)', doc).html(); var scriptEl = document.createElement('script'); scriptEl.type = 'text/javascript'; scriptEl.innerHTML = script_content; // good till here (function(sc){ eval(sc.innerHTML); // not exactly like this, but you get the idea, errors alert('wont get here ' + local_xw_sig); // local_xw_sig is a global "var" inside the source })(scriptEl); } }); so far so good, the script indeed contains the source from the entire script block. Now, inside this "script_content", there are auto executing functions, like $(document).ready(function(){...}) that, everything I "eval" the innerHTML, it executes this code, halting my encapsulated script. like variables that doesn't exist, etc removing certain parts of the script using regex isn't really an option... what I really wanted is to "walk" inside the function. like do a (completely fictional): script = eval("function(){" + script_content + "};"); alert(script['local_xw_sig']); // a03ucc34095cw3495 is there any way to 'disassemble' the function, and be able to reach the "var"s inside of it? like this function: function hello(){ var message = "hello"; } alert(hello.message); // message = var inside the function is it possible at all? or I will have to hack my way using regex? ;P [2] also, is there any way I can access javascript inside a document created with "createDocument"?

    Read the article

  • How can I invoke a function in bash shell script

    - by sufery
    !/bin/bash one_func(){ echo 'abcd' } echo $(one_func) echo one_func the end I just wonder the distinction calling the function between $(one_function) and one_function in bash shell script. When I set the variable "PS1" in ~/.bashrc, I can't invoke the function by one_func e: export PS1="\n[\e[31m]\$(one_func)" it work export PS1="\n[\e[31m]one_func" it doesn't work

    Read the article

  • Jquery callback function executes over and over again...

    - by Pandiya Chendur
    This my jquery function, function getRecordspage(curPage, pagSize) { // code here $(".pager").pagination(strarr[1], { callback: function() { getRecordspage(2, 5);},current_page: curPage - 1, items_per_page:'5', num_display_entries: '5', next_text: 'Next', prev_text: 'Prev', num_edge_entries: '1' }); } and i call this jquery function, <script type="text/javascript"> $(document).ready(function() { getRecordspage(1, 5); }); </script> As you see my It works fine for 1st time and my callback function is configured to the current function itself... when it gets called the callback gets executed over and over again.... How can i prevent this? Any suggestion....

    Read the article

  • jQuery plugin, return value from function

    - by Marius
    Hello there, Markup: <input type="text" name="email" /> Code: $(':text').focusout(function(){ $(this).validate(function(){ $(this).attr('name'); }); }); Plugin: (function($){ $.fn.validate = function(type) { return this.each(function(type) { if (type == 'email') { matches = this.val().match('/.+@.+\..{2,7}/'); (matches != null) ? alert('valid') : alert('invalid'); } /*else if (type == 'name') { } else if (type == 'age') { } else if (type == 'text') { }*/ else { alert('total failure'); } }); }; })(jQuery); The problem is that when I execute the code above, it runs the plugin as if type was a string: "function(){ $(this).attr('name'); });" instead of executing it as a function. How do I solve this? Thank you for your time. Kind regards, Marius

    Read the article

  • Need to call original function from detoured function

    - by peachykeen
    I'm using Detours to hook into an executable's message function, but I need to run my own code and then call the original code. From what I've seen in the Detours docs, it definitely sounds like that should happen automatically. The original function prints a message to the screen, but as soon as I attach a detour it starts running my code and stops printing. The original function code is roughly: void CGuiObject::AppendMsgToBuffer(classA, unsigned long, unsigned long, int, classB); My function is: void CGuiObject_AppendMsgToBuffer( [same params, with names] ); I know the memory position the original function resides in, so using: DWORD OrigPos = 0x0040592C; DetourAttach( (void*)OrigPos, CGuiObject_AppendMsgToBuffer); gets me into the function. This code works almost perfectly: my function is called with the proper parameters. However, execution leaves my function and the original code is not called. I've tried jmping back in, but that crashes the program (I'm assuming the code Detours moved to fit the hook is responsible for the crash). Edit: I've managed to fix the first issue, with no returning to program execution. By calling the OrigPos value as a function, I'm able to go to the "trampoline" function and from there on to the original code. However, somewhere along the lines the registers are changing and that is causing the program to crash with a segfault as soon as I get back into the original code.

    Read the article

  • Using a Function returning apointer as LValue

    - by Amrish
    Why cant I used a function returning a pointer as a lvalue? For example this one works int* function() { int* x; return x; } int main() { int* x = function(); x = new int(9); } but not this int* function() { int* x; return x; } int main() { int* x; function() = x; } While I can use a pointer variable as a lvalue, why can't I use a function returning a pointer as a lvalue? Also, when the function returns a refernce, instead of a pointer, then it becomes a valid lvalue.

    Read the article

  • VBA-Excel return multidimensional array from a function

    - by alesdario
    I'm trying to write a function which returns a multidimensional array. The problem is that the size of the array isn't defined. My array is initialized in the function below my_list() Dim my_list() As String Public Sub Load_My_List() Dim last_column As Integer last_column = some_helper.Get_Last_Column(somw_worksheet) 'my array is resized in this point ReDim my_list(1 To last_column - 1, 1) Dim i As Integer i = 1 For index= 2 To ultima_colonna my_list(i, 0) = some_worksheet.Cells(2, index).value my_list(i, 1) = index i = i + 1 Next index End Sub So, how can i write a function which returns my_list ? Something like the function below generate a mismacthing type error Public function Get_My_List as String() Get_My_List = my_list End Function and how can i call this function properly? I think that something like Dim test() as String test = Get_My_List will doesn't work

    Read the article

  • Foreign keys in django admin list display

    - by Olivier
    If a django model contains a foreign key field, and if that field is shown in list mode, then it shows up as text, instead of displaying a link to the foreign object. Is it possible to automatically display all foreign keys as links instead of flat text? (of course it is possible to do that on a field by field basis, but is there a general method?) Example: class Author(models.Model): ... class Post(models.Model): author = models.ForeignKey(Author) Now I choose a ModelAdmin such that the author shows up in list mode: class PostAdmin(admin.ModelAdmin): list_display = [..., 'author',...] Now in list mode, the author field will just use the __unicode__ method of the Author class to display the author. On the top of that I would like a link pointing to the url of the corresponding author in the admin site. Is that possible? Manual method: For the sake of completeness, I add the manual method. It would be to add a method author_link in the PostAdmin class: def author_link(self, item): return '<a href="../some/path/%d">%s</a>' % (item.id, unicode(item)) author_link.allow_tags = True That will work for that particular field but that is not what I want. I want a general method to achieve the same effect. (One of the problems is how to figure out automatically the path to an object in the django admin site.)

    Read the article

  • std::map keys in C++

    - by Soumava
    I have a requirement to create two different maps in C++. The Key is of type CHAR * and the Value is a pointer to a struct. I am filling 2 maps with these pairs, in separate iterations. After creating both maps I need find all such instances in which the value of the string referenced by the CHAR * are same. For this i am using the following code : typedef struct _STRUCTTYPE { .. } STRUCTTYPE, *PSTRUCTTYPE; typedef pair {CHAR *,PSTRUCTTYPE} kvpair; .. CHAR *xyz; PSTRUCTTYPE abc; after filling the information; Map.insert (kvpair(xyz,abc)); the above is repeated x times for the first map, and y times for the second map. after both are filled out; std::map {CHAR *, PSTRUCTTYPE} :: iterator Iter,findIter; for (Iter=iteratedMap-begin();Iter!=iteratedMap-end();mapIterator++) { char *key = Iter-first; printf("%s\n",key); findIter=otherMap-find(key); //printf("%u",findIter-second); if (findIter!=otherMap-end()) { printf("Match!\n"); } } The above code does not show any match, although the list of keys in both maps show obvious matches. My understanding is that the equals operator for CHAR * just equates the memory address of the pointers. My question is, what should i do to alter the equals operator for this type of key or could I use a different datatype for the string? *note : {} has been used instead of angle brackets as the content inside angle brackets was not showing up in the post.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >