Search Results

Search found 1545 results on 62 pages for 'manipulation'.

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

  • PHP multi dimensional array manipulation

    - by atif089
    Hi, This is my array Array ( [0] => Array ( [sample_id] => 3 [time] => 2010-05-30 21:11:47 ) [1] => Array ( [sample_id] => 2 [time] => 2010-05-30 21:11:47 ) [2] => Array ( [sample_id] => 1 [time] => 2010-05-30 21:11:47 ) ) And I want to get all the sample_ids in one array. can someone please help ? Can this be done without for loops (because arrays are very large).

    Read the article

  • Array merging/manipulation with Velocity

    - by Razor
    Hello, I have an array set inside a velocity template that contains some paths. The idea is to put a few "default" .js/.css files that 90% of the pages will use in this array. However, the other pages will still have to be able to add/delete values from this array, in case there are no linked files at all, or I need to add some. Given this code: #set ( $head.scripts = [ "https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js" ] ) #foreach ($URI in $head.scripts) <script type="text/javascript" src="$URI"></script> #end is there any way to add/delete values from these defaults? I have seen this list tool, but it looks like it's not enough for what I need.

    Read the article

  • python file manipulation

    - by lakshmipathi
    I have a directory /tmp/dir with two types of file names /tmp/dir/abc-something-server.log /tmp/dir/xyz-something-server.log .. .. and /tmp/dir/something-client.log I need append a few lines (these lines are constant) to files end with "client.log" line 1 line 2 line 3 line 4 append these four lines to files end with "client.log" and For files end with "server.log" I needed to append after a keyword say "After-this". "server.log " file has multiple entries of "After-this" I need to find the first entry of "After-this" and append above said four lines keep the remaining file as it is. Any help will be great appreciated :) Thanks in advance.

    Read the article

  • Rtti data manipulation and consistency in Delphi 2010

    - by Coco
    Has anyone an idea, how I can make TValue using a reference to the original data? In my serialization project, I use (as suggested in XML-Serialization) a generic serializer which stores TValues in an internal tree-structure (similar to the MemberMap in the example). This member-tree should also be used to create a dynamic setup form and manipulate the data. My idea was to define a property for the Data: TDataModel <T> = class {...} private FData : TValue; function GetData : T; procedure SetData (Value : T); public property Data : T read GetData write SetData; end; The implementation of the GetData, SetData Methods: procedure TDataModel <T>.SetData (Value : T); begin FData := TValue.From <T> (Value); end; procedure TDataModel <T>.GetData : T; begin Result := FData.AsType <T>; end; Unfortunately, the TValue.From method always makes a copy of the original data. So whenever the application makes changes to the data, the DataModel is not updated and vice versa if I change my DataModel in a dynamic form, the original data is not affected. Sure I could always use the Data property before and after changing anything, but as I use lot of Rtti inside my DataModel, I do not realy want to do this anytime. Perhaps someone has a better suggestion?

    Read the article

  • SQL string manipulation to return multiple rows

    - by Andy Jacobs
    I'm an experienced programmer, but relatively new to SQL. We're using Oracle 10 and 11. I have a system in place using SQL that combines actual rows with virtual rows (e.g. "SELECT 1 from DUAL") doing unions and intersects as needed, which all seems to work. My problem is that I need to combine this system which is expecting rows of data, with new data that will have the data in (let's say for simplification) comma delimited strings. So I think what I need is a way to convert a string like: "5,6,7,8" into 4 rows with one column each, with "5" in the first row, "6" in the second, etc. In other languages, I'd do a "Split" with comma as the delimiter. Of course, the data won't always have 4 entries. There's a second question, but I'll ask it separately. But I suspect it will simplify things, if possible, if the solution to the above could be used as a table in another SQL statement (i.e., to work with my existing system). Thanks for any help.

    Read the article

  • Android files manipulation

    - by klaus-vlad
    Hi, Through the housekeeping stuff my android application has to do is to read and write some files and sometimes to delete others and create new ones. The files in cause have all "sdcard/" as root. Is it safe if I perform all this task using Java style functions ? To me it is very handy to do it this way but I've read that not always the java functions can be applied when it comes to files in Android.

    Read the article

  • C# DateTime manipulation

    - by kb
    Hi I have a list of dates for an event in the following format 13/04/2010 10:30:00 13/04/2010 13:30:00 14/04/2010 10:30:00 14/04/2010 13:30:00 15/04/2010 10:30:00 15/04/2010 13:30:00 16/04/2010 10:30:00 17/04/2010 11:00:00 17/04/2010 13:30:00 17/04/2010 15:30:00 How can i have the list be output, so that the date is only displayed once followed by the times for that date, so the above list would look like something like this: 13/04/2010 10:30:00 13:30:00 14/04/2010 10:30:00 13:30:00 15/04/2010 10:30:00 13:30:00 16/04/2010 10:30:00 17/04/2010 11:00:00 13:30:00 15:30:00

    Read the article

  • VB.NET LINQ Result Set Manipulation.

    - by davemackey
    I have a table that looks like this: ID / Description / textValue / dateValue / timeValue / Type 1 / FRRSD / NULL / 2010-04-16 00:00:00.000 / NULL / classdates Now I've got a LINQ command to pull only the rows where the type is classdates from this table: Dim dbGetRegisterDates As New dcConfigDataContext Dim getDates = (From p In dbGetRegisterDates.webConfigOptions _ Where p.Type = "classdates" _ Select p) I now want to display the data in five different labels like so: lblClass1.Text = "Your class is from " & getDates.Description("FRRSD").dateValue & "to " & getDates.Description("FRRCD").dateValue Basically, I want to pull a row based on the description column value and then return the datevalue column value from that same row.

    Read the article

  • JQuery Attribute Manipulation

    - by TTCG
    When I search on the Internet about JQuery and I got the jquery cheat sheet. At there, I am very confused about how to use the following under which condition. Pls help me. [attribute|=val] [attribute*=val] [attribute~=val] [attribute$=val] [attribute=val] [attribute!=val] [attribute^=val] [attribute] [attribute1=val1] [attribute2=val2] What are the functions of these special character *, ~, $, !, ^? Thanks very much.

    Read the article

  • java array manipulation

    - by sachin
    Hi, I'm a beginner in java. I want the logic of the small program. I have two arrays array = {a1,a2,a3,a4,a5,,,,,,,,,an} and array2 = {b1,b2,b3,b4,,,,,,,,,,,bn} I want string as: a1b1,a2a3b2b3,a4a5a6b4b5b6,..........an Please tell me what will be the logic.

    Read the article

  • RichTextBox Vertical Scrollbar manipulation in visual studio.

    - by PlaZmaZ
    I've searched through related questions but can't find what I need. I have a richtextbox control. I need to trigger an event when the vertical scrollbar reaches a certain position (say 90% down to the bottom). I've been playing around with the events for the rich textbox but have yet to find anything. Any help would be greatly appreciated.

    Read the article

  • Bitmap manipulation in C++ on Windows

    - by Oliver
    Hi, I have myself a handle to a bitmap, in C++, on Windows: HBITMAP hBitmap; On this image I want to do some Image Recognition, pattern analysis, that sort of thing. In my studies at University, I have done this in Matlab, it is quite easy to get at the individual pixels based on their position, but I have no idea how to do this in C++ under Windows - I haven't really been able to understand what I have read so far. I have seen some references to a nice looking Bitmap class that lets you setPixel() and getPixel() and that sort of thing, but I think this is with .net . How should I go about turning my HBITMAP into something I can play with easily? I need to be able to get at the RGBA information. Are there libraries that allow me to work with the data without having to learn about DCs and BitBlt and that sort of thing?

    Read the article

  • DOM manipulation in PHP

    - by bluedaniel
    Hello everyone, Im trying to use the DOM in PHP to do a pretty specific job and Ive got no luck so far, the objective is to take a string of HTML from a Wordpress blog post (from the DB, this is a wordpress plugin). And then out of that HTML replace <div id="do_not_edit">old content</div>" with <div id="do_not_edit">new content</div>" in its place. Saving anything above and below that div in its structure. Then save the HTML back into the DB, should be simple really, I have read that a regex wouldnt be the right way to go here so Ive turned to the DOM instead. The problem is I just cant get it to work, cant extract the div or anything. Help me!! UPDATE The HTML coming out of the wordpress table looks like: Congratulations on finding us here on the world wide web, we are on a mission to create a website that will show off your culinary skills better than any other website does. <div id="do_not_edit">blah blah</div> We want this website to be fun and easy to use, we strive for simple elegance and incredible functionality.We aim to provide a 'complete package'. By this we want to create a website where people can meet, share ideas and help each other out. After several different (incorrect) workings all Ive got below is: $content = ($wpdb->get_var( "SELECT `post_content` FROM $wpdb->posts WHERE ID = {$article[post_id]}" )); $doc = new DOMDocument(); $doc->validateOnParse = true; $doc->loadHTMLFile($content); $element = $doc->getElementById('do_not_edit'); echo $element;

    Read the article

  • Image upload and Manipulation in Django

    - by Saransh Mohapatra
    I am trying upload images and than create an thumbnail of it and than store both in S3. After the file has been uploaded i am first uploading it to S3 and than trying to create thumbnail but it doesn't work as than PIL is not able to recognise the image. And secondly if I create the thumbnail first than while uploading original image I get EOF. I think Django allows just once for the uploaded files to be used only once....Please kindly tell me a way to do so....Thanks in advance

    Read the article

  • jQuery + CSS Manipulation using each()

    - by atif089
    Hi, I am trying to create a css menu. I would like to remove border and padding for every last li > a element on the child ul tag. (sorry for confusing) Here is the code for the menu <ul id="nav"> <li><a id="cat1" href="#">Menu 1</a></li> <li><a id="cat2" href="#">Menu 2</a></li> <li><a id="cat3" href="#">Menu 3</a> <ul> <li><a href="#">Sub Item 1 - M3</a></li> </ul> </li> <li><a id="cat4" href="#">Menu 4</a> <ul> <li><a href="#">Sub Item 2 - M3</a></li> <li><a href="#">Sub Item 3 - M3</a></li> <li><a href="#">Sub Item 4 - M3</a></li> </ul> </li> </ul> The code must remove border and padding for last elements that is <li><a href="#">Sub Item 1 - M3</a></li> <li><a href="#">Sub Item 4 - M3</a></li> Tried this but it takes off border for only sub item 4 $("#nav li ul").each(function(index) { $("#nav li ul > :last a").css('border','0 none'); $("#nav li ul > :last a").css('padding','0'); });

    Read the article

  • Porting Oracle Date Manipulation

    - by Grasper
    I need to port this following from Oracle syntax to Postgresql. Both FLO_END_DT and FLO_START_DATE are of type DATE in Oracle, and TIMESTAMP WITHOUT TIME ZONE in Postgresql: SELECT TRUNC( TO_CHAR(ROUND(( FL.FLO_END_DT- FL.FLO_START_DT)* 24), '9999D99'),2) FROM FLOWS FL I am not familiar enough with Oracle to know what it is trying to accomplish. Any ideas?

    Read the article

  • [C++] std::string manipulation: whitespace, "newline escapes '\'" and comments #

    - by rubenvb
    Kind of looking for affirmation here. I have some hand-written code, which I'm not shy to say I'm proud of, which reads a file, removes leading whitespace, processes newline escapes '\' and removes comments starting with #. It also removes all empty lines (also whitespace-only ones). Any thoughts/recommendations? I could probably replace some std::cout's with std::runtime_errors... but that's not a priority here :) const int RecipeReader::readRecipe() { ifstream is_recipe(s_buffer.c_str()); if (!is_recipe) cout << "unable to open file" << endl; while (getline(is_recipe, s_buffer)) { // whitespace+comment removeLeadingWhitespace(s_buffer); processComment(s_buffer); // newline escapes + append all subsequent lines with '\' processNewlineEscapes(s_buffer, is_recipe); // store the real text line if (!s_buffer.empty()) v_s_recipe.push_back(s_buffer); s_buffer.clear(); } is_recipe.close(); return 0; } void RecipeReader::processNewlineEscapes(string &s_string, ifstream &is_stream) { string s_temp; size_t sz_index = s_string.find_first_of("\\"); while (sz_index <= s_string.length()) { if (getline(is_stream,s_temp)) { removeLeadingWhitespace(s_temp); processComment(s_temp); s_string = s_string.substr(0,sz_index-1) + " " + s_temp; } else cout << "Error: newline escape '\' found at EOF" << endl; sz_index = s_string.find_first_of("\\"); } } void RecipeReader::processComment(string &s_string) { size_t sz_index = s_string.find_first_of("#"); s_string = s_string.substr(0,sz_index); } void RecipeReader::removeLeadingWhitespace(string &s_string) { const size_t sz_length = s_string.size(); size_t sz_index = s_string.find_first_not_of(" \t"); if (sz_index <= sz_length) s_string = s_string.substr(sz_index); else if ((sz_index > sz_length) && (sz_length != 0)) // "empty" lines with only whitespace s_string.clear(); } Some extra info: the first s_buffer passed to the ifstream contains the filename, std::string s_buffer is a class data member, so is std::vector v_s_recipe. Any comment is welcome :)

    Read the article

  • Java - Need help with binary/code string manipulation

    - by ShrimpCrackers
    For a project, I have to convert a binary string into (an array of) bytes and write it out to a file in binary. Say that I have a sentence converted into a code string using a huffman encoding. For example, if the sentence was: "hello" h = 00 e = 01, l = 10, o = 11 Then the string representation would be 0001101011. How would I convert that into a byte? <-- If that question doesn't make sense it's because I know little about bits/byte bitwise shifting and all that has to do with manipulating 1's and 0's.

    Read the article

  • C : files manipulation Can't figure out how to simplify this code with files manipulation.

    - by Bon_chan
    Hey guys, I have been working on this code but I can't find out what is wrong. This program does compile and run but it ends up having a fatal error. I have a file called myFile.txt, with the following content : James------ 07.50 Anthony--- 17.00 And here is the code : int main() { int n =2, valueTest=0,count=0; FILE* file = NULL; float temp= 00.00f, average= 00.00f, flTen = 10.00f; float *totalNote = (float*)malloc(n*sizeof(float)); int position = 0; char selectionNote[5+1], nameBuffer[10+1], noteBuffer[5+1]; file = fopen("c:\\myFile.txt","r"); fseek(file,10,SEEK_SET); while(valueTest<2) { fscanf(file,"%5s",&selectionNote); temp = atof(selectionNote); totalNote[position]= temp; position++; valeurTest++; } for(int counter=0;counter<2;counter++) { average += totalNote[counter]; } printf("The total is : %f \n",average); rewind(file); printf("here is the one with less than 10.00 :\n"); while(count<2) { fscanf(file,"%10s",&nameBuffer); fseek(file,10,SEEK_SET); fscanf(file,"%5s",&noteBuffer); temp = atof(noteBuffer); if(temp<flTen) { printf("%s who has %f\n",nameBuffer,temp); } fseek(file,1,SEEK_SET); count++; } fclose(file); } I am pretty new to c and find it more difficult than c# or java. And I woud like to get some suggestions to help me to get better. I think this code could be simplier. Do you think the same ?

    Read the article

  • Simplest Azure Storage Manipulation possible

    - by Hurricanepkt
    I have the need to integrate some blob storage into an existing ASP.NET Mvc site my hope is to be able to just add some references and then just do puts and gets but I cannot find any simple example for how to do this (that hasn't been depricated to the point it no longer works) I have tried using StorageClient but CreateCloudBlobClient() doesn't seem to work.

    Read the article

  • Can not issue data manipulation statements with executeQuery in java

    - by user225269
    I'm trying to insert records in mysql database using java, What do I place in this code so that I could insert records: String id; String name; String school; String gender; String lang; Scanner inputs = new Scanner(System.in); System.out.println("Input id:"); id=inputs.next(); System.out.println("Input name:"); name=inputs.next(); System.out.println("Input school:"); school= inputs.next(); System.out.println("Input gender:"); gender= inputs.next(); System.out.println("Input lang:"); lang=inputs.next(); Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/employee_record", "root", "MyPassword"); PreparedStatement statement = con.prepareStatement("insert into employee values('id', 'name', 'school', 'gender', 'lang');"); statement.executeUpdate();

    Read the article

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