Search Results

Search found 133 results on 6 pages for 'asd'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • How to write regex that searches for a dynamic amount of pairs?

    - by citronas
    Lets say a have a string such as this one: string txt = "Lore ipsum {{abc|prop1=\"asd\";prop2=\"bcd\";}} asd lore ipsum"; The information I want to extract "abc" and pairs like ("prop1","asd") , ("prop3", "bcd") where each pair used a ; as delimeter. Edit1: (based on MikeB's) code Ah, getting close. I found out how to parse the following: string txt = "Lore ipsum {{abc|prop1=\"asd\";prop2=\"http:///www.foo.com?foo=asd\";prop3=\"asd\";prop4=\"asd\";prop5=\"asd\";prop6=\"asd\";}} asd"; Regex r = new Regex("{{(?<single>([a-z0-9]*))\\|((?<pair>([a-z0-9]*=\"[a-z0-9.:/?=]*\";))*)}}", RegexOptions.Singleline | RegexOptions.IgnoreCase); Match m = r.Match(txt); if (m.Success) { Console.WriteLine(m.Groups["single"].Value); foreach (Capture cap in m.Groups["pair"].Captures) { Console.WriteLine(cap.Value); } } Question 1: How must I adjust the regex to say 'each value of a pair in delimited by \" only? I added chars like '.',';' etc, but I can't think of any char that I want to permit. The other way around would be much nicer. Question 2: How must I adjust this regex work with this thing here? string txt = "Lore ipsum {{abc|prop1=\"asd\";prop2=\"http:///www.foo.com?foo=asd\";prop3=\"asd\";prop4=\"asd\";prop5=\"asd\";prop6=\"asd\";}} asd lore ipsum {{aabc|prop1=\"asd\";prop2=\"http:///www.foo.com?foo=asd\";prop3=\"asd\";prop4=\"asd\";prop5=\"asd\";prop6=\"asd\";}}"; Therefore I'd probably try to get groups of {{...}} and use the other regex?

    Read the article

  • Apple Service Diagnostic application on USB key?

    - by Matt 'Trouble' Esse
    I found the following in a text file, and I would like to use the Apple Service Diagnostic Application from a bootable USB key but I cannot find where to download it or set it up? Also is this free software or does it require a separate licence? It sounds like it would be a useful tool for diagnosing Mac problems. The Apple Service Diagnostic application is designed to run both EFI and Mac OS X tests from an external USB hard drive. Apple Service Diagnostic (EFI) runs low-level tests of the hardware directly and does not require Mac OS X, while Apple Service Diagnostic (OS) uses Mac OS X to run tests. Booting and Using the Apple Service Diagnostic Application - Before using Apple Service Diagnostic, disconnect any Ethernet network, USB, and audio cables. - With the USB hard drive containing ASD 3S123 plugged into a USB port, restart the computer and hold down the option key as the computer boots up into the Startup Manager. To run ASD (EFI) select the "ASD EFI 3S123" drive icon and press return or select it with a mouse click. To run ASD (OS) select the "ASD OS 3S123" drive icon and press return or select it with a mouse click. ASD (EFI) will load in 20-30 seconds; ASD (OS) will load in 2-3 minutes. - After running ASD (OS) or ASD (EFI), press the Restart button to restart the computer back into the normal startup volume, or hold down the option key to get back to the Startup Manager. ASD is no longer delivered as an image to be restored onto a DVD. ASD 3S117 and newer versions requires installation onto an external USB hard drive. For more information, please refer to the document "Installing ASD on a USB hard drive".

    Read the article

  • Finding duplicate values in a SQL table

    - by Alex
    It's easy to find duplicates with one field SELECT name, COUNT(email) FROM users GROUP BY email HAVING ( COUNT(email) > 1 ) So if we have a table ID NAME EMAIL 1 John [email protected] 2 Sam [email protected] 3 Tom [email protected] 4 Bob [email protected] 5 Tom [email protected] This query will give us John, Sam, Tom, Tom because they all have the same e-mails. But what I want, is to get duplicates with the same e-mails and names. I want to get Tom, Tom. I made a mistake, and allowed to insert duplicate name and e-mail values. Now I need to remove/change the duplicates. But I need to find them first.

    Read the article

  • Finding duplicate values in a SQL table - ADVANCED

    - by Alex
    It's easy to find duplicates with one field SELECT name, COUNT(email) FROM users GROUP BY email HAVING ( COUNT(email) > 1 ) So if we have a table ID NAME EMAIL 1 John [email protected] 2 Sam [email protected] 3 Tom [email protected] 4 Bob [email protected] 5 Tom [email protected] This query will give us John, Sam, Tom, Tom because they all have the same e-mails. But what I want, is to get duplicates with the same e-mails and names. I want to get Tom, Tom. I made a mistake, and allowed to insert duplicate name and e-mail values. Now I need to remove/change the duplicates. But I need to find them first.

    Read the article

  • Regex not equal to string

    - by Kieron
    Hi, I'm banging my head against a wall with a regular expression. I'm trying to define an expression that excludes exactly this text 'System' (case insensitive), but can contain the word 'System' providing it's not just that. Examples: System == INVALID SYSTEM == INVALID system == INVALID syStEm == INVALID asd SysTem == Valid asd System asd == Valid System asd == Valid asd System == Valid asd == Valid

    Read the article

  • How to split a single column values to multiple column values?

    - by Shahsra
    Hi All, I have a problem splitting single column values to multiple column values. For Example: **Name** abcd efgh ijk lmn opq asd j. asdjja asb (asdfas) asd asd and I need the output something like this: first_name last_name abcd efgh ijk opq asd asdjja asb asd asd null The middle name can be omitted (no need for a middle name) The columns are already created and need to insert the data from that single 'Name' column. Thanks a lot, Shahsra

    Read the article

  • How do I make Nginx redirect all requests for files which do not exist to a single php file?

    - by Richard
    I have the following nginx vhost config: server { listen 80 default_server; access_log /path/to/site/dir/logs/access.log; error_log /path/to/site/dir/logs/error.log; root /path/to/site/dir/webroot; index index.php index.html; try_files $uri /index.php; location ~ \.php$ { if (!-f $request_filename) { return 404; } fastcgi_pass localhost:9000; fastcgi_param SCRIPT_FILENAME /path/to/site/dir/webroot$fastcgi_script_name; include /path/to/nginx/conf/fastcgi_params; } } I want to redirect all requests that don't match files which exist to index.php. This works fine for most URIs at the moment, for example: example.com/asd example.com/asd/123/1.txt Neither of asd or asd/123/1.txt exist so they get redirected to index.php and that works fine. However, if I put in the url example.com/asd.php, it tries to look for asd.php and when it can't find it, it returns 404 instead of sending the request to index.php. Is there a way to get asd.php to be also sent to index.php if asd.php doesn't exist?

    Read the article

  • Dovecot, Postfix, Postfixadmin - can't send/receive mail

    - by Jack
    I am setting up a mail server: Dovecot and Postfix with MySQL support and Postfixadmin. Spend literally all day trying to figure it out, but I'm still unable to neither send nor receive any emails. To my knowledge, I have configured everything correctly, so either there is another problem, or my knowledge isn't good enough. Here is what I get when I use "echo test | mail [email protected]:" Jul 11 00:41:07 server postfix/pickup[17999]: 5B0D32AE1B: uid=0 from= Jul 11 00:41:07 server postfix/cleanup[19444]: 5B0D32AE1B: message-id=<20120710214107.5B0D32AE1B@mail.asd.com Jul 11 00:41:07 server postfix/qmgr[18513]: 5B0D32AE1B: from=, size=329, nrcpt=1 (queue active) Jul 11 00:41:12 server postfix/smtp[19448]: 5B0D32AE1B: to=, relay=none, delay=5.3, delays=0.1/0.01/5.2/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=dsa.com type=MX: Host not found, try again) *@mail.asd.com is changed for privacy reasons, same goes for [email protected]. *The bold text is where it, for some reason, prints out dsa.com - even though I haven't found it anywhere in the files which I've edited during the installation, nor my DNS is .com in the first place. Here is what I get when I try to send out an email from Postfix Admin interface: Jul 11 00:49:08 server postfix/smtpd[19479]: connect from localhost[127.0.0.1] Jul 11 00:49:08 server postfix/trivial-rewrite[19484]: warning: do not list domain asd.com in BOTH mydestination and virtual_mailbox_domains Jul 11 00:49:08 server postfix/smtpd[19479]: 4F7892AE1E: client=localhost[127.0.0.1] Jul 11 00:49:08 server postfix/cleanup[19487]: 4F7892AE1E: message-id=<20120710214908.4F7892AE1E@mail.asd.com Jul 11 00:49:08 server postfix/qmgr[18513]: 4F7892AE1E: from=, size=317, nrcpt=1 (queue active) Jul 11 00:49:08 server postfix/smtpd[19479]: disconnect from localhost[127.0.0.1] Jul 11 00:49:10 server postfix/smtpd[19492]: connect from localhost[127.0.0.1] Jul 11 00:49:10 server postfix/trivial-rewrite[19484]: warning: do not list domain asd.com in BOTH mydestination and virtual_mailbox_domains Jul 11 00:49:10 server postfix/smtpd[19492]: 743AE2AE1F: client=localhost[127.0.0.1] Jul 11 00:49:10 server postfix/cleanup[19487]: 743AE2AE1F: message-id=<20120710214908.4F7892AE1E@mail.asd.com Jul 11 00:49:10 server postfix/qmgr[18513]: 743AE2AE1F: from=, size=772, nrcpt=1 (queue active) Jul 11 00:49:10 server postfix/smtpd[19492]: disconnect from localhost[127.0.0.1] Jul 11 00:49:10 server amavis[13437]: (13437-11) Passed CLEAN, LOCAL [127.0.0.1] - , Message-ID: <20120710214908.4F7892AE1E@mail.asd.com, mail_id: 86+KQY93ANel, Hits: -0.002, size: 317, queued_as: 743AE2AE1F, 2145 ms Jul 11 00:49:10 server postfix/smtp[19489]: 4F7892AE1E: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=2.3, delays=0.17/0.01/0/2.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 743AE2AE1F) Jul 11 00:49:10 server postfix/qmgr[18513]: 4F7892AE1E: removed I really don't know what might be the problem... If you need to know something, feel free to ask and I'll clarify something.

    Read the article

  • help with xpath selecting

    - by fayer
    i've got an id attribute value for an element. i want to select only its children (not all descendants). i used $childElements = $xml-xpath('//entity[@id=212323]'); print_r($childElements); but that would select ALL descendants and print them out. i just want to select the 1 generation children. how could i do that? <entity id=212323> <this>asd</this> <this>asd</this> <this>asd</this> <this> <notThis>asd</notThis> <notThis>asd</notThis> <notThis>asd</notThis> </this> </entity>

    Read the article

  • Why when i rotate the image black borders appear? PHP GD

    - by EAGhost
    This code generates two images using GD and rotates one of them. When I rotate the image black borders begin to appear. Anyone have an idea of how to resolve this? imagefilledrectangle($im, 0, 0, 300, 400, $black); imagefilledrectangle($im, 1, 1, 298, 398, $grey); imagefilledrectangle($im, 49, 69, 251, 271, $black); imagefilledrectangle($im, 50, 70, 250, 270, $white); imagefttext($im, 13, 0, 90, 30, $black, $font_file, "Wind Direcction"); $source=imagecreatetruecolor(100, 100); imagefilledrectangle($source, 0, 0, 100, 100, $white); $values = array( 20, 30, // Point 1 (x, y) 50, 0, 80, 30, 65, 30, 65, 100, 35, 100, 35, 30 // Point 7 (x, y) ); imagefilledpolygon($source, $values, 7, $black1); $asd=imagerotate($source, $rotate, 0); imagecolortransparent($asd, $black); imageantialias($asd, true); $insert_x = imagesx($asd); $insert_y = imagesy($asd); if($rotate==0 || $rotate==90 || $rotate==180 || $rotate==270){ imagecopymerge ( $im , $asd , 100 , 130 , 0 , 0 , $insert_x , $insert_y , 100 ); } if($rotate==45 || $rotate==135 || $rotate==225 || $rotate==315){ imagecopymerge ( $im , $asd , 85 , 110 , 0 , 0 , $insert_x , $insert_y , 100 ); } imageantialias($im, true); header('Content-Type: image/png'); imagepng($im); imagedestroy($im); ?

    Read the article

  • Independent name of a class

    - by tobi
    We have class lua. In lua class there is a method registerFunc() which is defined: void lua::registerFun() { lua_register( luaState, "asd", luaApi::asd); lua_register( luaState, "zxc", luaApi::zxc); } lua_register is a built-in function from lua library: http://pgl.yoyo.org/luai/i/lua_register it takes static methods from luaApi class as an 3rd argument. Now some programmer wants to use the lua class, so he is forced to create his own class with definitions of the static methods, like: class luaApi { public: static int asd(); static int zxc(); }; and now is the point. I don't want (as a programmer) to create class named exactly "luaApi", but e.g. myClassForLuaApi. But for now it's not possible because it is explicitly written in the code - in lua class: lua_register( luaState, "asd", luaApi::asd); I would have to change it to: lua_register( luaState, "asd", myClassForLuaApi::asd); but I don't want to (let's assume that the programmer has no access there). If it's still not understandable, I give up. :) Thanks.

    Read the article

  • Jquery addClass on radio box checked.

    - by Zoltan Repas
    I checked all the topics, but i simply don't know why my script does not work :( <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $('#pic').click(function() { $(this).parents("li").find(".green").removeClass("green"); if($(this).is(':checked')) { $(this).parents("ul").find("li").addClass('green'); } }); </script> etc... <ul> <li><input type="radio" name="pic" value="asd"/>asd</li> <li><input type="radio" name="pic" value="b"/>asd</li> <li><input type="radio" name="pic" value="ba"/>asd</li> <li><input type="radio" name="pic" value="bs"/>asd</li> <li><input type="radio" name="pic" value="bc"/>asd</li> </ul> Please help me!

    Read the article

  • jquery google visual api graph's data rows does not work.

    - by marharépa
    Hi! I'd like to use google drawVisualization API. Example: var data = new google.visualization.DataTable(); data.addColumn('string'); data.addColumn('number'); data.addRows([ ['a', 14], ['b', 47], ['c', 80], ['d', 55], ['e', 16], ['f', 90], ['g', 29], ['h', 23], ['i', 58], ['j', 48] ]); My version gets elements by an other google api, and join them, and after place the variable between ([ and ]), to be like in the example. var outputGraph = []; for (var i = 0, entry; entry = entries[i]; ++i) { var asd = [ entry.getValueOf('ga:pageTitle'), entry.getValueOf('ga:pageviews') ].join("',"); outputGraph.push(" ['" + asd + "]"); //get the 2 elements and join them to be like ['asd', 2], } // this is fine, the outputgraph is like ['asd', 2], ['asd', 2], ['asd', 2] as seen in the example var outputGraphFine = ("(["+outputGraph+"])"); // i suggest this is which fails the script. var data = new google.visualization.DataTable(); data.addColumn('string', 'Task'); data.addColumn('number', 'Hours per Day'); data.addRows = outputGraphFine; But it doesn't work. Why?

    Read the article

  • Asp.Net(C#) Jquery Json Data problem

    - by oraclee
    hi all; My Json Data {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} Jquery Code: $(document).ready(function() { $("#Button1").click(function() { var asd = "test"; $.get("CallBack.Aspx", { asd: asd }, function(data) { $.each(data, function() { }) }) }) }) I need "menuitem" in values how to make ? "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"},

    Read the article

  • ASP.NET (C#) jQuery JSON data problem

    - by oraclee
    My JSON Data {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} jQuery code: $(document).ready(function() { $("#Button1").click(function() { var asd = "test"; $.get("CallBack.Aspx", { asd: asd }, function(data) { $.each(data, function() { }) }) }) }) I need menuitem in values how to make ? "menuitem": [ { "value": "New", "onclick": "CreateNewDoc()" } ]

    Read the article

  • How to give a custom ASP.NET control the ability to parse XML markup to a collection?

    - by Vilx-
    I'm writing a custom ASP.NET webcontrol and would like it to have a collection of custom items which can also be specified in the XML markup. Something like this: class MyControl: WebControl { public IList<MyItemType> MyItems { get; private set; } } And in the markup: <asd:MyControl runat="server" id="mc1"> <MyItems> <MyDerivedCustomItem asd="dsa"/> <MyOtherDerivedCustomItem asd="dsa"/> </MyItems> </asd:MyControl> How do I do this? I though this was all about implementing some interface on the collection or adding some special attributes to the property, but nothing I do seems to work.

    Read the article

  • Book My Cloud Offering FREE PREMIUM Cpanel Accounts

    - by asd
    Book My Cloud Offering FREE PREMIUM Cpanel Accounts Reuqest Type: http://support.bookmycloud.com/ Select Request Type Free Cpanel Hosting Related Features: Resources Disk quota : 10 GB Monthly bandwidth : 300 GB Max FTP Accounts : 5 Max Email Accounts : Unlimited Max Email Lists : Unlimited Max Databases : 500 Max Sub Domains : 500 Max Parked Domains : 100 Max Addon Domains : 1000 Control Panel: Cpanel NO Ads Full DNS Management

    Read the article

  • learn the programming language for computing functions about integers

    - by asd
    Hi I know something about Pascal, Mathematica and Matlab, but I dont have any idea about C,C++,C# languages. I want to learn one of the languages that they they are fast and exact to compute some arithmetic functions for large numbers(for example larger than $10^3000$). I asked somebody and he said he used C++ and he said I computed this sequence in less than 10 min. I want to know C, C++, C# and visual kind of theses programs and know which is better for my goal. Let $f$ be an arithmetic function and A={k1,k2,...,kn} are integers in increasing order. Now I want to start with k1 and compare f(ki) with f(k1). If f(ki)f(k1), put ki as k1. Now start with ki, and compare f(kj) with f(ki), for ji. If f(kj)f(ki), put kj as ki, and repeat this procedure. At the end we will have a sub sequence B={L1,...,Lm} of A by this property: f(L(i+1))f(L(i)), for any 1<=i<=m-1 I have written a code for this program with Mathematica, and it take some hours to compute f of ki's or the set B for large numbers. For example, let f is the divisor function of integers. Do you know how to write the code for my purpose in Mathematica or Matlab. Mathematica is preferable.

    Read the article

  • how to write the code for this program specially in mathematica? [closed]

    - by asd
    I implemented a solution to the problem below in Mathematica, but it takes a very long time (hours) to compute f of kis or the set B for large numbers. Somebody suggested that implementing this in C++ resulted in a solution in less than 10 minutes. Would C++ be a good language to learn to solve these problems, or can my Mathematica code be improved to fix the performance issues? I don't know anything about C or C++ and it should be difficult to start to learn this languages. I prefer to improve or write new code in mathematica. Problem Description Let $f$ be an arithmetic function and A={k1,k2,...,kn} are integers in increasing order. Now I want to start with k1 and compare f(ki) with f(k1). If f(ki)f(k1), put ki as k1. Now start with ki, and compare f(kj) with f(ki), for ji. If f(kj)f(ki), put kj as ki, and repeat this procedure. At the end we will have a sub sequence B={L1,...,Lm} of A by this property: f(L(i+1))f(L(i)), for any 1<=i<=m-1 For example, let f is the divisor function of integers. Here I put some part of my code and this is just a sample and the question in my program could be more larger than these: «««««««««««««««««««««««««««««««««««« f[n_] := DivisorSigma[0, n]; g[n_] := Product[Prime[i], {i, 1, PrimePi[n]}]; k1 = g[67757] g[353] g[59] g[19] g[11] g[7] g[5]^2 6^3 2^7; k2 = g[67757] g[353] g[59] g[19] g[11] g[7] g[5] 6^5 2^7; k3 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5] 6^4 2^7; k4 = g[67759] g[349] g[53] g[19] g[11] g[7] g[5] 6^5 2^6; k5 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5] 6^4 2^8; k6 = g[67759] g[349] g[53] g[19] g[11] g[7] g[5]^2 6^3 2^7; k7 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5] 6^5 2^6; k8 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5] 6^4 2^9; k9 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5]^2 6^3 2^7; k10 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5] 6^5 2^7; k11 = g[67759] g[349] g[53] g[19] g[11] g[7] g[5]^2 6^4 2^6; k12 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5]^2 6^3 2^8; k13 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5]^2 6^4 2^6; k14 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5]^2 6^3 2^9; k15 = g[67757] g[359] g[53] g[19] g[11] g[7] g[5]^2 6^4 2^7; k16 = g[67757] g[359] g[53] g[23] g[11] g[7] g[5] 6^4 2^8; k17 = g[67757] g[359] g[59] g[19] g[11] g[7] g[5] 6^4 2^7; k18 = g[67757] g[359] g[53] g[23] g[11] g[7] g[5] 6^4 2^9; k19 = g[67759] g[353] g[53] g[19] g[11] g[7] g[5] 6^4 2^6; k20 = g[67763] g[347] g[53] g[19] g[11] g[7] g[5] 6^4 2^7; k = Table[k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k20]; i = 1; count = 0; For[j = i, j <= 20, j++, If[f[k[[j]]] - f[k[[i]]] > 0, i = j; Print["k",i]; count = count + 1]]; Print["count= ", count] ««««««««««««««««««««««««««««««««««««

    Read the article

  • How do you go about checking your open source libraries for keystroke loggers?

    - by asd
    A random person on the internet told me that a technology was secure(1), safe to use and didn't contain keyloggers because it is open source. While I can trivially detect the key stroke logger in this open source application, what can developers(2) do to protect themselves against rouge committers to open source projects? Doing a back of the envelope threat analysis, if I were a rogue developer, I'd fork a branch on git and promote it's download since it would have twitter support (and a secret key stroke logger). If it was an SVN repo, I'd create just create a new project. Even better would be to put the malicious code in the automatic update routines. (1) I won't mention which because I can only deal with one kind of zealot at a time. (2) Ordinary users are at the mercy of their virus and malware detection software-- it's absurd to expect grandma to read the source of code of their open source word processor's source code to find the keystroke logger.

    Read the article

  • What does it mean for SVN "to pollute the local source tree"?

    - by asd
    I'm reading "Professional Team Foundation Server 2010" by Wrox, and in an advantages/disadvantages list, the said: "Like CVS, SVN makes use of .svn directories inside the source folders to store state of the local working copy, and to allow synchronization with the server. However, it can have the affect of polluting the local source tree, and can cause performance issues wiht very large projects or files." What does the bit about pollution mean? I've used SVN for C# & ASP.NET projects for a long time and haven't encountered any problems. What probably does this quote think I should have been watching out for?

    Read the article

1 2 3 4 5 6  | Next Page >