Search Results

Search found 757 results on 31 pages for 'cp'.

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

  • latest org.json

    - by cp
    Hello A simple question where can I dn the latest org.json jar? The API shows 2010/01/05 for JSONObject and my last dn was 09/06/15. I cant find it on sourceforge or anywhere else. Can someone direct to the latest that will have an API at least as specified as of 2010/01/05? tia.

    Read the article

  • How is this Perl code selecting two different elements from an array?

    - by Mike
    I have inherited some code from a guy whose favorite past time was to shorten every line to its absolute minimum (and sometimes only to make it look cool). His code is hard to understand but I managed to understand (and rewrite) most of it. Now I have stumbled on a piece of code which, no matter how hard I try, I cannot understand. my @heads = grep {s/\.txt$//} OSA::Fast::IO::Ls->ls($SysKey,'fo','osr/tiparlo',qr{^\d+\.txt$}) || (); my @selected_heads = (); for my $i (0..1) { $selected_heads[$i] = int rand scalar @heads; for my $j (0..@heads-1) { last if (!grep $j eq $_, @selected_heads[0..$i-1]); $selected_heads[$i] = ($selected_heads[$i] + 1) % @heads; #WTF? } my $head_nr = sprintf "%04d", $i; OSA::Fast::IO::Cp->cp($SysKey,'',"osr/tiparlo/$heads[$selected_heads[$i]].txt","$recdir/heads/$head_nr.txt"); OSA::Fast::IO::Cp->cp($SysKey,'',"osr/tiparlo/$heads[$selected_heads[$i]].cache","$recdir/heads/$head_nr.cache"); } From what I can understand, this is supposed to be some kind of randomizer, but I never saw a more complex way to achieve randomness. Or are my assumptions wrong? At least, that's what this code is supposed to do. Select 2 random files and copy them. === NOTES === The OSA Framework is a Framework of our own. They are named after their UNIX counterparts and do some basic testing so that the application does not need to bother with that.

    Read the article

  • Struts:JSON:return multiple objects

    - by cp
    Hello Is it possible to return multiple JSON objects in the request header with Struts1? I am presently returning a single JSON objects, however the need now is to return a second data structure. All the client-side processing works perfectly for the single data structure in the single JSON objects, I really do not want to complicate it by putting two hetrogenous data structures in a single return JSON object. tia.

    Read the article

  • Programmatically parse and edit C++ Source Files

    - by Kryten
    Hi, I want to able programmatically parse and edit C++ source files. I need to be able to change/add code in certain sections of code (i.e. in functions, class blocks, etc). I would also (preferably) be able to get comments as well. Part of what I want to do can be explained by the following piece of code: CPlusPlusSourceParser cp = new CPlusPlusSourceParser(“x.cpp”); // Create C++ Source Parser Object CPlusPlusSourceFunction[] funcs = cp.getFunctions(); // Get all the functions for (int i = 0; i &lt funcs.length; i++) { // Loop through all functions funcs[i].append(/* … code I want to append …*/); // Append some code to function } cp.save(); // Save new source cp.close(); // Close file How can I do that? I’d like to be able to do this preferably in Java, C++, Perl, Python or C#. However, I am open to other language API’s.

    Read the article

  • BeanUtils getPropertyOfMapBean

    - by dx-cp
    Hi, Im wondering if it is possible to get data from property which is map cotaining pairs Key-StringArray (Map) in BeanUtils library. I just simply need to access one of array elements by calling propertyName=string[0]. Current version (1.8.3) does not support indexed properties. If you look into their code you will find in class PropertyUtilsBean in method getPropertyOfMapBean: if (resolver.isIndexed(propertyName) || resolver.isMapped(propertyName)) { throw new IllegalArgumentException( "Indexed or mapped properties are not supported on" + " objects of type Map: " + propertyName); } way too bad:-( Have any of you any tip how to do it somehow differently?

    Read the article

  • Querying XML using node numbers

    - by CP
    Okay, so I'm writing a utility that compares 2 XML documents using Microsoft's XML diff patch tool. The result looks something like this: <?xml version="1.0" encoding="utf-16"?><xd:xmldiff version="1.0" srcDocHash="10728157883908851288" options="IgnoreChildOrder IgnoreComments IgnoreWhitespace " fragments="yes" xmlns:xd="http://schemas.microsoft.com/xmltools/2002/xmldiff"><xd:node match="1"><xd:node match="1"><xd:node match="1"><xd:node match="2"><xd:node match="1"><xd:node match="1"><xd:node match="2"><xd:change match="1">testi22n2123</xd:change></xd:node></xd:node><xd:add match="/1/1/1/2/1/8" opid="1" /><xd:node match="7"><xd:node match="1"><xd:change match="1">31</xd:change></xd:node><xd:node match="2"><xd:change match="1">test2ing</xd:change></xd:node></xd:node><xd:remove match="8" opid="1" /></xd:node></xd:node></xd:node></xd:node></xd:node><xd:descriptor opid="1" type="move" /></xd:xmldiff> What I'm trying to do is go back into the source document and get the source data that represents the difference. I initially tried creating an Xpath query, but as I understand it now this XmlDiff thing works off the DOM... which seems like the dinosaur of XML objects these days. What's the best way to get at the node in the source XML by using the numbers provided in the diff result?

    Read the article

  • Hibernate HQL m:n join problem

    - by smallufo
    I am very unfamiliar with SQL/HQL , and am currently stuck with this 'maybe' simple problem : I have two many-to-many Entities , with a relation table : Car , CarProblem , and Problem . One Car may have many Problems , One Problem may appear in many Cars, CarProblem is the association table with other properties . Now , I want to find Car(s) with specified Problem , how do I write such HQL ? All ids are Long type . I've tried a lot of join / inner-join combinations , but all in vain.. -- updated : Sorry , forget to mention : Car has many CarProblem Problem has many CarProblem Car and Problem are not directly connected in Java Object. -- update , java code below -- @Entity public class Car extends Model{ @OneToMany(mappedBy="car" , cascade=CascadeType.ALL) public Set<CarProblem> carProblems; } @Entity public class CarProblem extends Model{ @ManyToOne public Car car; @ManyToOne public Problem problem; ... other properties } @Entity public class Problem extends Model { other properties ... // not link to CarProblem , It seems not related to this problem // **This is a very stupid query , I want to get rid of it ...** public List<Car> findCars() { List<CarProblem> list = CarProblem.find("from CarProblem as cp where cp.problem.id = ? ", id).fetch(); Set<Car> result = new HashSet<Car>(); for(CarProblem cp : list) result.add(cp.car); return new ArrayList<Car>(result); } } The Model is from Play! framework , so these properties are all public .

    Read the article

  • javascript "associative" array access

    - by cp
    Hello I have a simple simulated aarray with two elements: bowl["fruit"]="apple"; bowl["nuts"]="brazilian"; I can access the value with an event like this: onclick="testButton00_('fruit')">with `testButton00_` function testButton00_(key){ var t = bowl[key]; alert("testButton00_: value = "+t); } However whenever I try to access the aarray from within code with a key that is just a non-explicit string I get undefined. Do I have somehow have to pass the parameter with the escaped 'key'. Any ideas? tia.

    Read the article

  • ???????????????

    - by Todd Bao
    ?????????,???????????????????,??????????,???????,??????,?????????????: SYS@fmw//Scripts> @showfkparent hr employees---------------|             ||DEPARTMENT_ID| +>-->HR.DEPARTMENTS.DEPARTMENT_ID|             ||JOB_ID       | +>-->HR.JOBS.JOB_ID|             ||MANAGER_ID   | +>-->HR.EMPLOYEES.EMPLOYEE_ID|             |--------------- SYS@fmw//Scripts> @showfkparent sh sales------------|          ||CHANNEL_ID| +>-->SH.CHANNELS.CHANNEL_ID|          ||CUST_ID   | +>-->SH.CUSTOMERS.CUST_ID|          ||PROD_ID   | +>-->SH.PRODUCTS.PROD_ID|          ||PROMO_ID  | +>-->SH.PROMOTIONS.PROMO_ID|          ||TIME_ID   | +>-->SH.TIMES.TIME_ID|          |------------ ????????? ??? 30-08-2012 set echo offset verify offset serveroutput ondefine table_owner='&1'define table_name='&2'declare        type info_typ is record (ct varchar2(30),cc varchar2(30),po varchar2(30),pt varchar2(30),pc varchar2(30));        type info_tab_typ is table of info_typ index by pls_integer;        info_tab info_tab_typ;        max_col_length number := 0;beginwith        cons_child as (select                        owner,constraint_name,table_name,                        r_owner,r_constraint_name                from dba_constraints                where                        constraint_type='R' and                        owner=upper('&table_owner') and                        table_name=upper('&table_name')),        cons_parent as (select owner,constraint_name,table_name                from dba_constraints                where                        (owner,constraint_name) in                        (select r_owner,r_constraint_name from cons_child))select        child.table_name child_table_name,        child.column_name child_column_name,        parent.owner parent_owner,        parent.table_name parent_table_name,        parent.column_name parent_column_name        bulk collect into info_tabfrom        cons_child cc,        cons_parent cp,        dba_cons_columns parent,        dba_cons_columns childwhere        cc.owner = child.owner and        cc.constraint_name = child.constraint_name and        cp.owner = parent.owner and        cp.constraint_name = parent.constraint_name and        cc.r_owner = cp.owner and        cc.r_constraint_name = cp.constraint_name and        parent.position = child.positionorder by 2;if (info_tab is not null and info_tab.count >0) then        for i in 1..info_tab.count loop                if length(info_tab(i).cc) > max_col_length then                        max_col_length := length(info_tab(i).cc);                end if;        end loop;        dbms_output.put_line(rpad('-',max_col_length+2,'-'));                dbms_output.put_line(' '||'|'||rpad(' ',max_col_length,' ')||'|');        for i in 1..info_tab.count loop                dbms_output.put('|'||rpad(info_tab(i).cc,max_col_length,' ')||'|');                dbms_output.put_line(' +>-->'||info_tab(i).po||'.'||info_tab(i).pt||'.'||info_tab(i).pc);                dbms_output.put_line('|'||rpad(' ',max_col_length,' ')||'|');        end loop;        dbms_output.put_line(rpad('-',max_col_length+2,'-'));else        dbms_output.put_line('### No foreign key defined on this table! ###');end if;end;/undefine table_ownerundefine table_nameset serveroutput off Todd

    Read the article

  • Copy files in Linux, avoid the copy if files do exist in destination

    - by user10826
    Hi, I need to copy a /home/user folder from one hardisk to another one. It has 100000 files and around 10G size. I use cp -r /origin /destination sometines I get some errors due to broken links, permissions and so on. So I fix the error, and need to start again the copy. I wonder how could I tell the command "cp", once it tries to copy again, not to copy files again if they exist in the destination folder. Thanks

    Read the article

  • Is a dedicated server similar in setup to a VPS?

    - by Dr Hydralisk
    I was thinking about getting a dedicated server (I may need the extra power that a VPS can't provide) from The Planet but I don't know to much about how you would operate one. I have experience in setting up multiple VPS's on Linode and Slicehost, I just select my OS in their CP and connect via SSH in putty and do my thing. Is it the same with dedicated servers (just chose you OS from the CP and connect via SSH and put on whatever crap you want)?

    Read the article

  • change socket to other then default in phpPgAdmin

    - by DanFromGermany
    I need to change the socket phpPgAdmin connects to in its config. // Hostname or IP address for server. Use '' for UNIX domain socket. // use 'localhost' for TCP/IP connection on this computer $conf['servers'][0]['host'] = '/opt/jasperreports-server-cp-5.1.0/postgresql/.s.PGSQL.5432'; this does not work (even without the last part .s.PGSQL.5432). The path is correct, because I can connect through: :~# psql --host=/opt/jasperreports-server-cp-5.1.0/postgresql/

    Read the article

  • GAE/Django Templates (0.96) filters to get LENGTH of GqlQuery and filter it

    - by Halst
    I pass the query with comments to my template: COMM = CommentModel.gql("ORDER BY created") doRender(self,CP.template,{'CP':CP,'COMM':COMM, 'authorize':authorize()}) And I want to output the number of comments as a result, and I try to do things like that: <a href="...">{{ COMM|length }} comments</a> Thats does not work (yeah, since COMM is GqlQuery, not a list). What can I do with that? Is there a way to convert GqlQuery to list or is there another solution? (first question) Second question is, how to filter this list in template? Is there a construct like this: <a href="...">{{ COMM|where(reference=smth)|length }} comments</a> so that I can get not only the number of all comments, but only comments with certain db.ReferenceProperty() property, for example. Last question: is it weird to do such things using templates?

    Read the article

  • MySQL SELECT MAX multiple tables : foreach parent return eldest son's picture

    - by Guillermo
    **Table parent** parentId | name **Table children** childId | parentId | pictureId | age **Table childrenPictures** pictureId | imgUrl no i would like to return all parent names with their eldest son's picture (only return parents that have children, and only consider children that have pictures) so i thought of something like : SELECT c.childId AS childId, p.name AS parentName, cp.imgUrl AS imgUrl, MAX(c.age) AS age FROM parent AS p RIGHT JOIN children AS c ON (p.parentId = c.parentId) RIGHT JOIN childrenPictures AS cp ON (c.pictureId = cp.pictureId)) GROUP BY p.name This query will return each parent's eldest son's age, but the childId will not correspond to the eldest sons id, so the output does not show the right sons picture. Well if anyone has a hint i'd appreciate very much Thank you very much, G

    Read the article

  • linq query - The method or operation is not implemented.

    - by Dejan.S
    I'm doing the Rob Conery mvc storefront and at one place I'm suppose to get categories but I get an error with this linq query and I can not get why. It's exactly the same as his. var culturedName = from ct in ReadOnlyContext.CategoryCultureDetails where ct.Culture.LanguageCode == System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName select new { ct.CategoryName, ct.CategoryId }; return from c in ReadOnlyContext.Categories join cn in culturedName on c.CategoryId equals cn.CategoryId select new Core.Model.Category { Id = c.CategoryId, Name = cn.CategoryName, ParentId = c.ParentId ?? 0, Products = new LazyList<Core.Model.Product>(from p in GetProducts() join cp in ReadOnlyContext.Categories_Products on p.Id equals cp.ProductId where cp.CategoryId == c.CategoryId select p) }; its the return query that mess things up. I have checked and the culturename actually gets data from the database. Appricate your help

    Read the article

  • What causes my borderless C++/CLI app to crash when overriding WndProc?

    - by Ste
    I use a form with border NONE. I need to override WndProc for resize and move form. However, using this code, my app crashes! static const int WM_NCHITTEST = 0x0084; static const int HTCLIENT = 1; static const int HTCAPTION = 2; protected: virtual void Form1::WndProc(System::Windows::Forms::Message %m) override { switch (m.Msg) { case WM_NCHITTEST: if (m.Result == IntPtr(HTCLIENT)) { m.Result = IntPtr(HTCAPTION); } break; } Form1::WndProc(m); } virtual System::Windows::Forms::CreateParams^ get() override { System::Windows::Forms::CreateParams^ cp = __super::CreateParams; cp->Style |= 0x40000; return cp; } How can I fix my code not to crash but still allow my form to be moved and resized?

    Read the article

  • What causes my borderless C++ app to crash when overriding WndProc?

    - by Ste
    I use a form with border NONE. I need to override WndProc for resize and move form. However, using this code, my app crashes! static const int WM_NCHITTEST = 0x0084; static const int HTCLIENT = 1; static const int HTCAPTION = 2; protected: virtual void Form1::WndProc(System::Windows::Forms::Message %m) override { switch (m.Msg) { case WM_NCHITTEST: if (m.Result == IntPtr(HTCLIENT)) { m.Result = IntPtr(HTCAPTION); } break; } Form1::WndProc(m); } virtual System::Windows::Forms::CreateParams^ get() override { System::Windows::Forms::CreateParams^ cp = __super::CreateParams; cp->Style |= 0x40000; return cp; } How can I fix my code not to crash but still allow my form to be moved and resized?

    Read the article

  • MacPorts: violation of the ports-filesystem hierarchy in the destroot phase

    - by Dawood
    I'm in the process of developing a Portfile for my application and I'm running into problems during the destroot phase. According to the MacPorts guide, the destroot phase executes the following command: make install DESTDIR=${destroot} I think I may be misunderstanding how this is supposed to work in the Makefile. My application is very simple and the install rule only needs to copy a couple of directories to the DESTDIR so it is specified as follows: install: cp -R bin $(DESTDIR)/bin cp -R lib $(DESTDIR)/lib cp -R cfg $(DESTDIR)/cfg However, when I try to do a MacPort installation of my application, I get the following warnings: ---> Staging test into destroot Warning: violation by /bin Warning: violation by /lib Warning: violation by /cfg Warning: test violates the layout of the ports-filesystems! How do I fix this? Am I misunderstanding how the DESTDIR variable is used in the install rule or missing something altogether?

    Read the article

  • EBS: OPP Out of memory issue...

    - by ashish.shrivastava
    FO Processor is little more hungry for memory compare to other Java process. If XSLT scalable option is not set and the same time your RTF template is not well optimized definitely you are going to hit Out of memory exception while working with large volume of data. If the memory requirement is not too bad, you can set the OOP Heap size using following SQL queries. Check the current OPP JVM Heap size using following SQL query SQL select DEVELOPER_PARAMETERS from FND_CP_SERVICES where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME = 'FNDCPOPP' DEVELOPER_PARAMETERS ----------------------------------------------------- J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m Set the JVM Heap size using following SQL query SQL update FND_CP_SERVICES set DEVELOPER_PARAMETERS = 'J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx2048m' where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME = 'FNDCPOPP'); SQLCommit; . You need to restart the Concurrent Manager to make it effective. If this does not resolve the issue, You need to optimize RTF template and set the XSLT scalable option true.

    Read the article

  • How to copy a folder from /home/kevin to /opt

    - by lambda23
    I have a new computer installed with Ubuntu 12.04. Then I want to install wireless driver named compat-wireless-3.5-3. Before that, the driver folder to /home/kevin. I want to install it on /opt directory. Before install the driver, i want to copy the driver folder from /home/kevin to /opt. I try to use ordinary copy (Right Click Copy Paste), but the paste is blured. After that, i tried using this on terminal: sudo cp /home/kevin/compat-wireless-3.5-3 /opt But i get this command: cp: omitting directory `home/kevin/compat-wireless-3.5-3' What does the command mean? I can't copy the driver until now.

    Read the article

  • Bash prompt doesn't print until I interact with console again

    - by durron597
    I don't even know where to begin to diagnose this one. Usually, when a command finishes, the prompt prints itself for the next command. However, that is not happening. Hard to explain with words, I'll just use an example: User@Machine:~$ cp /mnt/mountname/directory/textfile.txt . After waiting several seconds (far too long for this operation on a small file) I press Enter, and see: User@Machine:~$ cp /mnt/mountname/directory/textfile.txt . User@Machine:~$ User@Machine:~$ So clearly the operation had finished, but the prompt didn't display... until I pressed enter, and then BOTH prompts instantly displayed. This error does not happen with commands like cd.

    Read the article

  • Commandline shortcut for current directory similar to ~ for home directory?

    - by NES
    When i use the cp or move command in a terminal window, i'm currently with bash in a certain folder like this. NES@server:~/Desktop/dir1$ And now i wanna copy a file from here ~/anotherdir/dir2 into the current chosen folder in bash (dir1) i would use the command cp ~/anotherdir/dir2/file ~/Desktop/dir1 does a shortcut string exist to refer to the current chosen directory? So that in this example i don't have to provide the full path to the target dir, but the command knows it should use the current chosen directory in bash? i.e. as ~ stands for the home directory?

    Read the article

  • sed problem with scripting

    - by Pablo Ramos
    I am trying to run a script using sed i runing like this for et in 1 # 2 3 do if [ -d ET$et ]; then rm -rf ET$et; fi mkdir ET$et cd ET$et cp $home/step_$i/FDE/diabatA/run.adf . cp $home/step_$i/FDE/diabatA/mas$i.xyz . awk1=`awk '/type=fde/{print NR }' run.adf | head -1` awk2=`$(echo "$a+379" | bc -l )` sed -n "$awk1,"$awk2"p" run.adf > first awk3=`awk '/ATOMS/{print NR +1}' first` awk4=`cat mas$i.xyz | wc -l` awk4=$( echo "$awk4-1" | bc -l ) awk5=`awk "/ATOMS/{print NR +"${awk4}" }" run.adf` sed -n "$awk3,"$awk4"p" first > atoms par=$( echo "$awk4-99" | bc -l ) rho1=$(cat atoms | head -34 ) rho2=$(cat atoms | head -64 | tail -31) rho3=$(cat atoms | head -97 | tail -33) rhoall=$(cat atoms | tail -${par} ) echo -e "$rho1\n$rho2\n$rhoall" > eje done but is telling me this: (standard_in) 1: syntax error sed: -e expression #1, char 6: unexpected `,' sed: -e expression #1, char 1: unknown command: `,' Please, I appreciate any help with this issue... Thanks Pablo

    Read the article

  • How can I keep directories in sync

    - by Guillaume Boudreau
    I have a directory, dirA, that users can work in: they can create, modify, rename and delete files & sub-directores in dirA. I want to keep another directory, dirB, in sync with dirA. What I'd like, is a discussion on finding a working algorithm that would achieve the above, with the limitations listed below. Requirements: 1. Something asynchronous - I don't want to stop file operations in dirA while I work in dirB. 2. I can't assume that I can just blindly rsync dirA to dirB on regular interval - dirA could contain millions of files & directories, and terrabytes of data. Completely walking the dirA tree could take hours. Those two requirements makes this really difficult. Having it asynchronous means that when I start working on a specific file from dirA, it might have moved a lot since it appeared. And the second limitation means that I really need to watch dirA, and work on atomic file operations that I notice. Current (broken) implementation: 1. Log all file & directory operations in dirA. 2. Using a separate process, read that log, and 'repeat' all the logged operations in dirB. Why is it broken: echo 1 > dirA/file1 # Allow the 'log reader' process to create dirB/file1: log = "write dirA/file1"; action = cp dirA/file1 dirB/file1; result = OK echo 1 > dirA/file2 mv dirA/file1 dirA/file3 mv dirA/file2 dirA/file1 rm dirA/file3 # End result: file1 contains '1' # 'log reader' process starts working on the 4 above file operations: log = "write file2"; action = cp dirA/file2 dirB/file2; result = failed: there is no dirA/file2 log = "rename file1 file3"; action = mv dirB/file1 dirB/file3; result = OK log = "rename file2 file1"; action = mv dirB/file2 dirB/file1; result = failed: there is no dirB/file2 log = "delete file3"; action = rm dirB/file3; result = OK # End result in dirB: no more files! Another broken example: echo 1 > dirA/dir1/file1 mv dirA/dir1 dirA/dir2 # 'log reader' process starts working on the 2 above file operations: log = "write file1"; action = cp dirA/dir1/file1 dirB/dir1/file1; result = failed: there is no dirA/dir1/file1 log = "rename dir1 dir2"; action = mv dirB/dir1 dirB/dir2; result = failed: there is no dirA/dir1 # End result if dirB: nothing!

    Read the article

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