Search Results

Search found 1817 results on 73 pages for 'corina 123'.

Page 43/73 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • How to split strings at specific intervals to arrays in javascript

    - by t3st
    how to split strings at specific interveals to arrays in javascript for example: split this string into 4 characters (including space and characters) this is an example should be split,numbers(123),space,characters also included to this ------> 1st array is ------> 2nd array an ------> 3rd array exam ------> 4th array ple ------> 5th array shou ------> 6th array ............ etc till..... ..ed ------> last array

    Read the article

  • fopen & fwrite function is not working from browser?

    - by ungalnanban
    fopen function is not working in php. I wrote the following code in my php file. $fh = fopen("/home/sugumar/Public_html/sugumar/public_html/123","a+"); fwrite($fh,"hello"); I ran this code from command line: php file_name.php its working fine. But If I run this code from browser it shows the following error. Warning: fopen(Logs/add_employee.logs) [function.fopen]: failed to open stream: Permission denied in /home/sugumar/Public_html/sugumar/public_html/HRMS/HRMS_add_emp_DB.php on line 111 Warning: fwrite(): supplied argument is not a valid stream resource in /home/sugumar/Public_html/sugumar/public_html/HRMS/HRMS_add_emp_DB.php on line 113 how to solve this problem? Thanks in advance.

    Read the article

  • how to retrive String from DatagramPacket

    - by sajith
    the following code prints [B@40545a60,[B@40545a60abc exp but i want to print abc,so that i can retrive the correct message from the receiving system public class Operation { InetAddress ip; DatagramSocket dsock; DatagramPacket pack1; byte[] bin,bout; WifyOperation(InetAddress Systemip) { ip=Systemip; try { dsock=new DatagramSocket(); } catch (SocketException e) { // TODO Auto-generated catch block e.printStackTrace(); } } void sendbyte() { String senddata="abc"+"123"; bout=senddata.getBytes(); pack1=new DatagramPacket(bout,bout.length,ip,3322); try { dsock.send(pack1); Log.d(pack1.getData().toString(),"abc exp"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } how i retrieve string instead of byte from the packet pack1

    Read the article

  • Implementing a recursive menu system a'la Joomla in CodeIgniter

    - by pettersolberg
    Hi I have some sites powered by Joomla, but with my current assignment I wanted to try something new and created with CodeIgniter a really basic CMS (just to suit my client's needs). Everything works fine except menus - multilevel menus like in Joomla, Drupal etc. with items and subitems... My question is: do you know of any tutorials or texts abut implementing such a structure. I've tried the recursion thinggy with while getting children's IDs move downwards from the parent while searching for the currently displayed item's ID. I've tried also the Drupalish way with having a path parameter enclosing ID's all the way from top to bottom '1/23/123/3'. But all in all it was just too chaotic - code something, try it out. If you have some idea on this topic - thanks in advice.

    Read the article

  • Question about a dialog form and submit errors

    - by user248959
    Hi, I have the link below that executes the action message/new which shows a form inside a jqueryui modal dialog. <div id="myDialog"> </div> echo jq_link_to_remote('Enviar mensaje', array( 'url' => 'mensaje/new?receptor='.$miembro->getId().'&tipo=0&estado=0', 'update' => 'myDialog', 'complete' => "jQuery('#myDialog').dialog({ width:375, height:220, top:123, resizable:false, modal:true, autoOpen: false }); jQuery('#myDialog').dialog('open')" )); The point: if there are submit errors the form is not showed inside the dialog form but in a empty page (mensaje/create).. Any idea? Javi

    Read the article

  • C# Count registry keys existing using a partial value

    - by cheeseman
    Microsoft.Win32.RegistryKey registryPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Testing"); Microsoft.Win32.RegistryKey entryKey = registryPath.OpenSubKey("Entry Point"); I have a lot of keys in Testing, in the format: "Entry Point 011", "Entry Point 123" - so Entry Point with random numbers after it. Would I be able to search the registryPath variable above and get a count of the number of keys containing the "Entry Point" keyword? Assuming that there are also other keys existing without this keyword. At the moment I have been using a for loop and looping for all possible combinations to get a count of all the keys, checking if the key exists or not, but as there are keys as high as "Entry Point 9000" having a for loop execute 9000 times is very inefficient. for (int i = 0; i <= highestEntryPointValue; i++) { Microsoft.Win32.RegistryKey entryKey = steamApps64.OpenSubKey("Entry Point " + Convert.ToString(i)); if (entryKey != null) { count++; } }

    Read the article

  • jQuery Running a function in a context and adding to a variable

    - by Mark
    For this question I'm going to give a simplified example of what I want to do, and the function I want to learn to write. var collection = ''; <div id='container'> <span>1</span> <span>2</span> <span>3</span> </div> What I want to do this, for every span in the div, take its text, add it to the collection. So ideally it would look like: $('#container').addtoCollection(collection); The method would be something like: $(this).find('span').each(function () { collection = collection + $(this).text(); }). Where the first this would equal #container. So in the end you can do: console.log(collection); and get: 123 How do I write the function that does this? Thanks!

    Read the article

  • Workaround for UnsupportedAudioFileException ?

    - by tschan
    I'm in a very early stage of writing a small music/rhythm game in Java (via Slick framework, which in turns uses OpenAL, but that's probably irrelevant here). The game needs to read (and playback) several sound files in WAV format, but some of the files are throwing [javax.sound.sampled.UnsupportedAudioFileException] exceptions. at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1102) at org.newdawn.slick.openal.WaveData.create(WaveData.java:123) at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:713) at org.newdawn.slick.openal.SoundStore.getWAV(SoundStore.java:683) at org.newdawn.slick.Sound.<init>(Sound.java:33) The files can be played back just fine in Winamp or Foobar2000, so this means Java just don't recognize some variants of the file format. What are my options at this point? Note: The files in question are user-supplied, so i cannot just convert them beforehand (using something like audacity). Any conversion steps must be done at runtime.

    Read the article

  • Access denied for user 'root@localhost' (using password:NO)

    - by Nasser Hajloo
    I'm new to mysql, I'm trying to run Wordpress inmy windows desktop and it need Mysql. I install everything with Web Platform Installer which provided by microsoft. I never seta root password for mysql and in final step of installing wordpressit askfor root password of mysql. What is the default password for root (if there is one) and how to change it? I try mysql -u root password '123' but it show me Access denied for user 'root@localhost' (using password:NO) after this I try mysql -u root -p but it ask for a password which I don't have Thank you in advance

    Read the article

  • php class basic question

    - by Ross
    hi <?php class myClass { var $input; var $output; function myClass($input) { $output = 'You entered: ' . $input; return $output; } } $test = new myClass; echo $test->myClass(123); ?> this works, but returns this warning: Warning: Missing argument 1 for myClass::myClass() I read in to this, and seems that the constructor is expecting a value, so by adding: function myClass($input='') the warning is removed, but this seems so unnecessary? could someone enlighten me as to why it's required to define a value to prevent that warning? thanks for any pointers

    Read the article

  • Linq To SQL: Retain list order when using .Contains

    - by rockinthesixstring
    I'm using Lucene.net to build a MyListOfIds As List(Of Integer) which I then pass on to my Linq service. I then search the database as follows Return _EventRepository.Read().Where(Function(e) MyListOfIds.Contains(e.ID)).ToList Now I know that Lucene is already ordering MyListOfIds based on the weight it gave each term. What sucks is that Linq is losing that order in it's SQL search. My Question: How can I retain that sort order when building my Lambda expression? I tried using LINQPad to see how the query is being built, but because I had to declare a variable LINQPad didn't show me the resultant SQL :-( Here's what I tried in LINQPad Dim i As New List(Of Integer) i.Add(1) i.Add(100) i.Add(15) i.Add(3) i.Add(123) Dim r = (From e In Events Where i.Contains(e.ID) Select e) note: my example is in VB.NET, but I don't mind if responses are in C#

    Read the article

  • How to get value array of object using jquery

    - by Sthepen
    Hi there.. i have problem to get all element in array of object using jquery... i get this code from internet... var id = 123; var test = new Object(); test.Identification = id; test.Group = "users"; test.Persons = new Array(); test.Persons.push({"FirstName":" AA ","LastName":"LA"}); test.Persons.push({"FirstName":" BB ","LastName":"LBB"}); test.Persons.push({"FirstName":" CC","LastName":"LC"}); test.Persons.push({"FirstName":" DD","LastName":"LD"}); how to get each of "FirstName" and "LastName" in Persons using JQuery??

    Read the article

  • how to set length and postion for repeat-x and scroll background-image?

    - by user550945
    Hi all, I have an to set background image. it is a red line under the input value. background-attachment:scroll; background-color:#FFFFFF; background-image:url("../images/errorLine.gif"); background-position:left bottom; background-repeat:repeat-x; the input value is like "123; 456; 789;". the red line cover all the string, its length is the same as the input width. Is there any way to make the red line only under the "456;"? Is there anyway to do it by CSS? Thanks a lot. Best regards, Ryanivanka

    Read the article

  • Optional URL fragment in Codeigniter?

    - by DA
    This is maybe a simple syntax question or possibly a best-practices question in terms of codeigniter. I should start by saying I'm not a PHP or Codeigniter person so trying to get up to speed on helping on a project. I've found the CI documentation fairly good. The one question I can't find an answer to is how to make part of a URL optional. An example the CI documentation uses is this: example.com/index.php/products/shoes/sandals/123 and then the function used to parse the URI: function shoes($sandals, $id) For my example, I'd like to be able to modify the URL as such: example.com/index.php/products/shoes/all So, if no ID is passed, it's just ignored. Can that be done? Should that be done? A second question unrelated to my problem but pertaining to the example above, why would the variable $sandals be used as in the example, the value is 'sandals'? Shouldn't that variable be something like $shoetype?

    Read the article

  • Sum two rows in one - My Sql

    - by user303832
    I have found some similar posts, but I didn't find them useful. But I didn't know how to group them. I would like to Sum 'No' and 'Not Set' to one row, and to lose 'Not Set' row. So : 'No' = 'No' + 'Not Set' I have something like this : TEST TestCount Month 'Yes' 123 March 'No' 432 March 'Not Set' 645 March 'Yes' 13 April 'No' 42 April 'Not Set' 45 April 'Yes' 133 May 'No' 41 May 'Not Set' 35 May .... And I would like something like this : TEST TestCount Month 'Yes' 423 March 'No' 410 March 'Yes' 154 April 'No' 192 April 'Yes' 130 May 'No' 149 May .... Can anybody help me with this, tnx in advance

    Read the article

  • IE sending through multiple unrequested requests for parent URL

    - by andyjeffries
    We have a rather large/complex web site (so it's not easy to extract portions of it). The problem we're having is that IE6/7/8 (but 6 is the worst) are sending through multiple requests for the parent of a URL (which fails, a different point). As an example, if you visited (dummy domain name obviously): http://www.example.com/view/event/123/456/78 We'd get 8-20 requests for: http://www.example.com/view/event/123/456/ appear in the Apache log. We've tried: Disabling all plugins (including toolbars, Flash, etc) Disabling scripting (e.g. Javascript) And it still sends through at least one erroneous request. We've viewed the requests through ieHttpHeaders so the browser is aware of them (i.e. it's not prefetching by the network's proxy). Any ideas? What can else could cause this?

    Read the article

  • How to use a value from one stored procedure in another?

    - by RoguePlanetoid
    I have the following statement in a Stored Procedure: DECLARE @Count INT EXEC @Count = GetItemCount 123 SELECT @Count Which calls another stored procedure with the following statement inside: SELECT COUNT(Item) FROM tblItem WHERE ID = @ID However when I test the call the EXEC outputs the value correctly but it is not assigned to the @Count Variable correctly. I've seen examples or stored procedures used like this, including here but none had a parameter and a return value used (that I could find). The ID Parameter is passed into the second statement which returns a count value used by the first StoredProcedure - all the info I have read seems to indicate this should work - but it doesn't the @Count value is aways zero, even when the GetItemCount returns always the correct value. This is in Microsoft SQL Server 2008 if that helps.

    Read the article

  • Fastest algorithm to check if a number is pandigital?

    - by medopal
    Pandigital number is a number that contains the digits 1..number length. For example 123, 4312 and 967412385. I have solved many Project Euler problems, but the Pandigital problems always exceed the one minute rule. This is my pandigital function: private boolean isPandigital(int n){ Set<Character> set= new TreeSet<Character>(); String string = n+""; for (char c:string.toCharArray()){ if (c=='0') return false; set.add(c); } return set.size()==string.length(); } Create your own function and test it with this method int pans=0; for (int i=123456789;i<=123987654;i++){ if (isPandigital(i)){ pans++; } } Using this loop, you should get 720 pandigital numbers. My average time was 500 millisecond. I'm using Java, but the question is open to any language.

    Read the article

  • How can i sort DESC and ASC in list generic?

    - by Phsika
    How can I sort DESC and ASC in a generic list? With LINQ and without LINQ ? I'm using vs 2008. class Program { static void Main(string[] args) { List<int> li = new List<int>(); li.Add(456); li.Add(123); li.Add(12345667); li.Add(0); li.Add(1); li.Sort(); foreach (int item in li) { Console.WriteLine(item.ToString()+"\n"); } Console.ReadKey(); } }

    Read the article

  • Problem with NHibernate and saving - NHibernate doesn't detect changes and uses old values.

    - by Vilx-
    When I do this: Cat x = Session.Load<Cat>(123); x.Name = "fritz"; Session.Flush(); NHibernate detects the change and UPDATEs the DB. But, when I do this: Cat x = new Cat(); Session.Save(x); x.Name = "fritz"; Session.Flush(); I get NULL for name, because that's what was there when I called Session.Save(). Why doesn't NHibernate detect the changes - or better yet, take the values for the INSERT statement at the time of Flush()?

    Read the article

  • php array into mysql

    - by mckenzie
    Hello, $sql_where = ''; $exclude = '30,35,36,122,123,124,125'; if($exclude != '') { $exclude_forums = explode(',', $exclude); foreach ($exclude_forums as $id) { if ($id > 0) { $sql_where = ' AND forum_id <> ' . trim($id); } } } $sql = 'SELECT topic_title, forum_id, topic_id, topic_type, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_time FROM ' . TOPICS_TABLE . ' WHERE topic_status <> 2 AND topic_approved = 1 ' . $sql_where . ' ORDER BY topic_time DESC'; The above code i use to exclude the id of forum to be displayed on sql queries. Why doesn't it work and still display it? Any solution

    Read the article

  • SQLite: does data type depend on the quotes?

    - by Septagram
    In SQLite, the datatype of a value is associated with the value itself, not with the column type. So suppose we have a table with an integer primary key "id" and an integer column "some_number". If I do a query like this: INSERT INTO mytable (id, some_number) VALUES (NULL, "1234") Will 123 be inserted as an integer or as string? What consequences it will have later for me, say, when I'm comparing it with other value like "234" (as a number 1234 234, as a string "1234" < "234", right?)?

    Read the article

  • Trouble Passing Parameter to LinqToSql Stored Procedure

    - by Webjedi
    public IEnumerable<T> ExecuteStoredProcedure<T>(params object[] parameters) { Type genericType = typeof(T); string commandthing = genericType.Name.Replace("Result", ""); //_db is my Linq To Sql database return _db.ExecuteQuery<T>(commandthing, parameters).AsEnumerable(); } The stored procedure is named GetOrder and has a single int parameter of orderid. I'm calling the above like so: SqlParameter parm1 = new SqlParameter("@orderid", SqlDbType.Int); parm1.Value = 123; var results = _session.ExecuteStoredProcedure<GetOrderResult>(parm1).Single(); I'm receiving the following error: A query parameter cannot be of type 'System.Data.SqlClient.SqlParameter' Thoughts? Or am I just missing something obvious?

    Read the article

  • Using Python, How to copy files in 'temporary internet files' folder in Windows

    - by pythBegin
    I am using this code to find files recursively in a folder , with size greater than 50000 bytes. def listall(parent): lis=[] for root, dirs, files in os.walk(parent): for name in files: if os.path.getsize(os.path.join(root,name))>500000: lis.append(os.path.join(root,name)) return lis This is working fine. But when I used this on 'temporary internet files' folder in windows, am getting this error. Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> listall(a) File "<pyshell#2>", line 5, in listall if os.path.getsize(os.path.join(root,name))>500000: File "C:\Python26\lib\genericpath.py", line 49, in getsize return os.stat(filename).st_size WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Documents and Settings\\khedarnatha\\Local Settings\\Temporary Internet Files\\Content.IE5\\EDS8C2V7\\??????+1[1].jpg' I think this is because windows gives names with special characters in this specific folder... Please help to sort out this issue.

    Read the article

  • Adding a child node to a JSON node dynamically

    - by Sai
    I have to create a nested multi level json depending on the resultset that I get from MYSQL. I created a json object initially. Now I want to add child nodes to the already child nodes in the object. d = collections.OrderedDict() jsonobj = {"test": dict(updated_at="today", ID="ID", ads=[])} for rows1 in rs: jsonobj['list']["ads"].append(dict(unit = "1", type ="ad_type", id ="123", updated_at="today", x_id="111", x_name="test")) cur.execute("SELECT * from f_test") rs1 = cur.fetchall() for rows2 in rs1: propertiesObj = [] d["name"]="propName" d["type"]="TypeName" d["value"]="Value1" propertiesObj.append(d) jsonobj['play_list']["ads"].append() Here in the above line I want to add another child node to [play_list].[ads] which is a array list again. the output should look like the following [list].[ads].[preferences].

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >