Daily Archives

Articles indexed Saturday January 8 2011

Page 13/30 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • error when I use GWT RPC

    - by Sebe
    Hello everyone... I have a problem with Eclipse when I use an RPC.. If I use a single method call it's all in the right direction but if I add a new method to handle the server I get the following error: com.google.gwt.core.client.JavaScriptException: (null): null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:184) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35) at com.google.gwt.user.client.rpc.impl.RpcStatsContext.isStatsAvailable(RpcStatsContext.java) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:221) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:619) Can I have more services in an asynchronous call right? Where am I wrong? This is my implementation MyService: package de.vogella.gwt.helloworld.client; import com.google.gwt.user.client.rpc.RemoteService; public interface MyService extends RemoteService { //chiamo i metodi presenti sul server public void creaXML(String nickname,String pass,String email2,String gio,String mes, String ann); public void setWeb(String userCorrect,String query, String titolo,String snippet,String url); } MyServiceAsync package de.vogella.gwt.helloworld.client; import com.google.gwt.user.client.rpc.AsyncCallback; public interface MyServiceAsync { void creaXML(String nickname,String pass,String email2,String gio,String mes, String ann,AsyncCallback<Void> callback); void setWeb(String userCorrect,String query, String titolo,String snippet,String url, AsyncCallback<Void> callback); } RPCService: package de.vogella.gwt.helloworld.client; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; import com.google.gwt.user.client.ui.FlexTable; public class RPCService implements MyServiceAsync { MyServiceAsync service = (MyServiceAsync) GWT.create(MyService.class); ServiceDefTarget endpoint = (ServiceDefTarget) service; public RPCService() { endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "rpc"); } public void creaXML(String nickname,String pass,String email2,String gio,String mes, String ann,AsyncCallback callback) { service.creaXML(nickname, pass, email2, gio, mes, ann, callback); } public void setWeb(String userCorrect,String query, String titolo,String snippet,String url,AsyncCallback callback) { service.setWeb(userCorrect,query, titolo,snippet,url,callback); } } MyServiceImpl package de.vogella.gwt.helloworld.server; import java.io.*; import org.w3c.dom.*; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import de.vogella.gwt.helloworld.client.MyService; import com.google.gwt.user.client.ui.FlexTable; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.google.gwt.xml.client.Element; import com.google.gwt.xml.client.NodeList; public class MyServiceImpl extends RemoteServiceServlet implements MyService { //metodo che inserisce il nuovo iscritto public void creaXML(String nickname,String pass,String email2,String gio,String mes, String ann){ ....... } public void setWeb(String userCorrect,String query, String titolo,String snippet,String url) { ..... } In the app in client-side I do RPCService rpc2 = New RPCService() rpc2.setWeb(..,...,...,...,callback); and RPCService rpc = New RPCService() rpc.creaXML(..,...,...,...,callback); (in other posizions in the code...) and.. AsyncCallback callback = new AsyncCallback() { public void onFailure(Throwable caught) { Window.alert("Failure!"); } public void onSuccess(Object result) { Window.alert("Successoooooo"); } }; Web.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- Servlets --> <!-- Default page to serve --> <welcome-file-list> <welcome-file>De_vogella_gwt_helloworld.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>rPCImpl</servlet-name> <servlet-class>de.vogella.gwt.helloworld.server.MyServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>rPCImpl</servlet-name> <url-pattern>/de_vogella_gwt_helloworld/rpc</url-pattern> </servlet-mapping> </web-app> Thank you all for your attention Sebe

    Read the article

  • waveInProc / Windows audio question...

    - by BTR
    I'm using the Windows API to get audio input. I've followed all the steps on MSDN and managed to record audio to a WAV file. No problem. I'm using multiple buffers and all that. I'd like to do more with the buffers than simply write to a file, so now I've got a callback set up. It works great and I'm getting the data, but I'm not sure what to do with it once I have it. Here's my callback... everything here works: // Media API callback void CALLBACK AudioRecorder::waveInProc(HWAVEIN hWaveIn, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) { // Data received if (uMsg == WIM_DATA) { // Get wav header LPWAVEHDR mBuffer = (WAVEHDR *)dwParam1; // Now what? for (unsigned i = 0; i != mBuffer->dwBytesRecorded; ++i) { // I can see the char, how do get them into my file and audio buffers? cout << mBuffer->lpData[i] << "\n"; } // Re-use buffer mResultHnd = waveInAddBuffer(hWaveIn, mBuffer, sizeof(mInputBuffer[0])); // mInputBuffer is a const WAVEHDR * } } // waveInOpen cannot use an instance method as its callback, // so we create a static method which calls the instance version void CALLBACK AudioRecorder::staticWaveInProc(HWAVEIN hWaveIn, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { // Call instance version of method reinterpret_cast<AudioRecorder *>(dwParam1)->waveInProc(hWaveIn, uMsg, dwInstance, dwParam1, dwParam2); } Like I said, it works great, but I'm trying to do the following: Convert the data to short and copy into an array Convert the data to float and copy into an array Copy the data to a larger char array which I'll write into a WAV Relay the data to an arbitrary output device I've worked with FMOD a lot and I'm familiar with interleaving and all that. But FMOD dishes everything out as floats. In this case, I'm going the other way. I guess I'm basically just looking for resources on how to go from LPSTR to short, float, and unsigned char. Thanks much in advance!

    Read the article

  • How does the stream manipulators work?

    - by Narek
    It is well known that the user can define stream manipulators like this: ostream& tab(ostream & output) { return output<< '\t'; } And this can be used in main() like this: cout<<'a'<<tab<<'b'<<'c'<<endl; Please explain me how does this all work? If operator<< assumes as a second parameter a pointer to the function that takes and returns ostream &, then please explain my why it is necessary? What would be wrong if the function does not take and return ostream & but it was void instead of ostream &? Also it is interesting why “dec”, “hex” manipulators take effect until I don’t change between them, but user defined manipulators should be always used in order to take effect for each streaming?

    Read the article

  • Optimizing processing and management of large Java data arrays

    - by mikera
    I'm writing some pretty CPU-intensive, concurrent numerical code that will process large amounts of data stored in Java arrays (e.g. lots of double[100000]s). Some of the algorithms might run millions of times over several days so getting maximum steady-state performance is a high priority. In essence, each algorithm is a Java object that has an method API something like: public double[] runMyAlgorithm(double[] inputData); or alternatively a reference could be passed to the array to store the output data: public runMyAlgorithm(double[] inputData, double[] outputData); Given this requirement, I'm trying to determine the optimal strategy for allocating / managing array space. Frequently the algorithms will need large amounts of temporary storage space. They will also take large arrays as input and create large arrays as output. Among the options I am considering are: Always allocate new arrays as local variables whenever they are needed (e.g. new double[100000]). Probably the simplest approach, but will produce a lot of garbage. Pre-allocate temporary arrays and store them as final fields in the algorithm object - big downside would be that this would mean that only one thread could run the algorithm at any one time. Keep pre-allocated temporary arrays in ThreadLocal storage, so that a thread can use a fixed amount of temporary array space whenever it needs it. ThreadLocal would be required since multiple threads will be running the same algorithm simultaneously. Pass around lots of arrays as parameters (including the temporary arrays for the algorithm to use). Not good since it will make the algorithm API extremely ugly if the caller has to be responsible for providing temporary array space.... Allocate extremely large arrays (e.g. double[10000000]) but also provide the algorithm with offsets into the array so that different threads will use a different area of the array independently. Will obviously require some code to manage the offsets and allocation of the array ranges. Any thoughts on which approach would be best (and why)?

    Read the article

  • Using jQuery to load Telerik MVC scripts.

    - by ProfK
    I'm busy building my first MVC app that uses the Telerik MVC components. Their docs specify that the ScriptRegistrar helper be called right at the bottom of a view, e.g. "at the end of the master page.". I assume this renders a script block that must only run when the page has loaded. I normally prefer to achieve this using jQuery, and keep all my script related stuff at the top of my master page, preferably in the <head> tag. Is there anything I can do to achieve this with the Telerik components and do away with the lone and forgotten helper call at the bottom of my master page?

    Read the article

  • Problems with the Enterframe Event

    - by user434565
    Hey guys, I have been developing a game using Flex, and used the Timer class to keep the main loop going. However, when I tried using the enterFrame event to do the main loop, there were a few problems. First of all, physics simulation seemed way too fast. Is the enterFrame event called more than once per frame? I set the application's global frame rate to 24, so shouldn't the application set off the event every 1/24 of a second? And the second problem is that when the game runs like this, some MXML components that are added are not shown. I have absolutely no idea why this happens. Help me please?!? Thanks.

    Read the article

  • ASP.NET 4.0- Html Encoded Expressions

    - by Jalpesh P. Vadgama
    We all know <%=expression%> features in asp.net. We can print any string on page from there. Mostly we are using them in asp.net mvc. Now we have one new features with asp.net 4.0 that we have HTML Encoded Expressions and this prevent Cross scripting attack as we are html encoding them. ASP.NET 4.0 introduces a new expression syntax <%: expression %> which automatically convert string into html encoded. Let’s take an example for that. I have just created an hello word protected method which will return a simple string which contains characters that needed to be HTML Encoded. Below is code for that. protected static string HelloWorld() { return "Hello World!!! returns from function()!!!>>>>>>>>>>>>>>>>>"; } Now let’s use the that hello world in our page html like below. I am going to use both expression to give you exact difference. <form id="form1" runat="server"> <div> <strong><%: HelloWorld()%></strong> </div> <div> <strong><%= HelloWorld()%></strong> </div> </form> Now let’s run the application and you can see in browser both look similar. But when look into page source html in browser like below you can clearly see one is HTML Encoded and another one is not. That’s it.. It’s cool.. Stay tuned for more.. Happy Programming Technorati Tags: ASP.NET 4.0,HTMLEncode,C#4.0

    Read the article

  • Some websites hosted on my server cant be reached from some places.

    - by valter
    Hello. I have a bloblem that is causing me headaches to solve. I have a webserver at 100tb.com, running CentOS. I also have these nameservers setted up: 67.213.220.170 ns1.maisturismo.net 67.213.220.171 ns2.maisturismo.net My domain is at Godaddy. I added two Host Summary pointig to the nameserver ips... NS1 to the first IP, and NS2 to the second... Than I changed the nameservers of maisturismo.net to ns1.maisturismo.net and ns2.maisturismo.net http://img20.imageshack.us/i/dnswm.jpg/ Bellow the image showing my dns records to maisturismo.net http://img137.imageshack.us/i/nameservers.jpg/ Its strange... Everythink looks fine, but the webiste is not reachable from [zend2.com][1] proxy, and from some other places, like a friend's house, that dont use the same web provider that I use. I have another nameserver setted up on my server, that have the same problem, All websites that use it cant be reached from zend2.com and from my friends house, except a ".com.br"(Brazillian Domain). Do you have same idea about, what is causing this? I really cant imagine what is the problem... Thanks. [1]: http:// zend2.com

    Read the article

  • How do i network ten branch office with voip, video calling and files sharing.

    - by Oluwalogbon
    Am an IT person, have done some networking job for my organization like Lan and wireless within the area, configure windows server to manage staff account My company has ten branch (In each state) in my country and am giving a task to connect dose branch together, which there will be VOIP, Video calling and sharing of files within the branch. I need someone to help me with this project..what and what did I need to put in place

    Read the article

  • Cloning hard drive -- data, operating system settings, everything

    - by Salman A
    I am using Windows XP. My hard drive (Seagate 160gig Barracuda) is about to fail. Its already developed bad sectors and it seems to get worse everyday. Data transfer mode is down to PIO mode 2, chkdsk runs every now and then, registry and important windows files get corrupted and I spend 30-60 minutes running chkdsk /f /r from the recovery console. I've got a replacement (Seagate 5000gig Barracuda) and now i want to transfer each and every thing on to the new drive. I don't want to go through windows and software installation, I spent ages getting all those software installed and configured on that hard drive. Need advice: whats the best way to transfer everything onto the new drive so that it behaves just like the old one. And are there any "gotchas".

    Read the article

  • Laptop and 2 screens: use screens but not monitor display

    - by ClarkeyBoy
    Hi, I have 1 VGA socket on my laptop, and currently have that in use by a large screen. At some point in the future I would like to get another one of these screens and use both screens in dual screen mode but not use my laptop display (to be honest my laptop display is pretty rubbish as its like 2/3s the size of my screen - even if I had the choice to use all 3 I probably wouldn't want to). Is it possible to achieve this? If so, what do I need by way of hardware / software, and how much do you reckon it should cost me? Thanks in advance. Regards, Richard

    Read the article

  • Creating image of NTFS partition in Ubuntu

    - by Pappai
    Hi, I have a system that has to be formatted often because of the specific use of it (Use it in internet cafe). I have to install the drivers and apps each time. That is a time consuming and cumbersom task for me. I want to install windows, drivers, apps etc. once and create a backup of the entire C:\ drive, and keep it in a linux partition so that I can restore the OS with all the apps & drivers ready to go! I have ubuntu live CD with me and I have created a linux partition (ext4) in the HDD. My question is: How can I create an image of the C:\ drive (ntfs disk) in Ubuntu and store it in the linux partition?

    Read the article

  • Looking for an alternative to PuTTY on Windows

    - by mririgo
    PuTTY is good at what it does, but I'm somewhat envious of Mac Terminal and even Ubuntu's Terminal. I'm looking for good alternatives to PuTTY that would include some of the aesthetics found in Mac and Ubuntu's Terminal applications. Tabs! The ability to drop the window's opacity The ability to open right to the command prompt and ssh in (no intial config window every time) Etc. Feel free to share any Windows terminal applications you would recommend. Or maybe it's possible to get PuTTY to do some of these things. Whatever, I'm cool with that.

    Read the article

  • 2010 outlook stationery

    - by chris
    I have just installed Microsoft 2010 I am using the 'Outlook 2010' for my email program. For the past few years I have used Outlook Express and used the program quite well However with the Outlook 2010 I have not been able to find 2 functions that I was able to do on Outlook Express 1) OE I could press stationary and it would insert a BIT Map for me , however when I do stationary in Outlook 2010 it no longer allows me to insert the Bit map. 2) OE I created a rule that allowed me to copy emails into another folder , however in 2010 it only allows me to move as a rule and not the initial copy. Please could you explain how I may be able to use the same function in 2010?

    Read the article

  • Wireless bridge between two prolink adsl modem/router

    - by MyName
    Allright, so i've got 2 prolink hurricane h5004n. Its a broadband adsl modem and router. My Pc is connected to the first one via ethernet. What i want to do is a wireless bridge to make the 2 routers "talk". I've tried hooking up the dsl cable (as they are modems) in both to try but when one disconnects as the other connects. I don't really know about the configurations to be done of all the DCHP or RIP and NAT forwarding stuffs. (i'm just writing what i saw) In short i want the second router to act as a wifi repeater but i don't see any repeater option and i also do not want to connect them via ethernet. So is it possible to do something? Apart from buying another repeater i don't want to spend anymore i'm done :S

    Read the article

  • Why is it good not to rely on changing state?

    - by Slomojo
    This question arises out of the question Is Haskell worth learning? Generally a few often repeated statements are made, about how Haskell improves your coding skills in other languages, and furthermore, this is because Haskell is stateless, and that's a good thing. Why? I've seen someone compare this to only typing with the left hand, or perhaps closing your eyes for a day and just relying on touch. Surely there is more to it than that? Does it relate to hardware memory access, or something else which is a big performance gain?

    Read the article

  • loading 60 images locally fast is it possible...? [closed]

    - by Tariq- iPHONE Programmer
    when my app starts it loads 60 images at a time in UIImageView and it also loads a background music. in simulator it works fine but in IPAD it crashes.. -(void)viewDidLoad { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; //img.animationImages = [[NSArray arrayWithObjects: MyImages = [NSArray arrayWithObjects: //[UIImage imageNamed: @"BookOpeningB001.jpg"],...... B099,nil]; //[NSTimer scheduledTimerWithTimeInterval: 8.0 target:self selector:@selector(onTimer) userInfo:nil repeats:NO]; img.animationImages = MyImages; img.animationDuration = 8.0; // seconds img.animationRepeatCount = 1; // 0 = loops forever [img startAnimating]; [self.view addSubview:img]; [img release]; [pool release]; //[img performSelector:@selector(displayImage:) ]; //[self performSelector:@selector(displayImage:) withObject:nil afterDelay:10.0]; [self performSelector: @selector(displayImage) withObject: nil afterDelay: 8.0]; } -(void)displayImage { SelectOption *NextView = [[SelectOption alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:NextView animated:NO]; [NextView release]; } Am i doing anything wrong ? Is there any other alternative to load the local images faster in UIImageView !

    Read the article

  • Slow to sync music files?

    - by pst007x
    I have created a folder in the Ubuntu One sync folder and called it music. I have added various albums and the folder has started to sync. However the files were added back in October and still only the folders have synced and no music files. I tested this service before and added a single music file directly into the Ubuntu One folder (no sub folders) and within a few days it synced, however it seems anything in sub folders seem to stall or take a very long time. My ubuntu One program always says syncing and the progression bar creeps, but still no files synced. I know there are issues with speed but a month and going to sync? I recently tested the same files with Dropbox and it took 9 hours. I have port forwarded the https (443) port both in the software firewall and in my router, I tried disabling both firewalls too, either way it makes no difference. I have also tried both from home and the office on different Ubuntu systems. Is there anything anyone has done to improve this service? I am trying to integrate Ubuntu One service into the office to share project files but the syncing is taking to long. I am using the latest Ubuntu 10.10 (fully updated, fresh install), I love Ubuntu and wish to continue to support it anyway I can, so a solution would be good :-) Any help would be appreciated. Thanks Paul

    Read the article

  • Teamviewer in notification area only

    - by bisi
    Hello, I was wondering if there was a simple way to close Teamviewer to the notification area like I would close Skype? EDIT: Just to clarify my initial post, I want to enable Teamviewer in the notification area so that I can close it in my open programs bar (click on x), and it would still be running in the notification area (Skype does that, I can option Banshee and Rythmbox to do that, and Transmission does this too). AllTray puts it into the notification area, but the x still closes Teamviewer completely, and I have not found an optional setting in Teamviewer either. Thanks for the answer though Karni! ;) Thank you, bisi

    Read the article

  • Persisting non-entity class that extends an entity (jpa) - example?

    - by Michal Minicki
    The JPA tutorial states that one can have a non-entity that extends entity class: Entities may extend both entity and non-entity classes, and non-entity classes may extend entity classes. - http://java.sun.com/javaee/5/docs/tutorial/doc/bnbqa.html Is it possible to persist such structure? I want to do this: @Entity abstract class Test { ... } class FirstConcreteTest extends Test { ... } // Non-ntity class SecondConcreteTest extends Test { ... } // Non-entity Test test = new FirstConcreteTest(); em.persist(test); What I would like it to do is to persist all fields mapped on abstract Test to a common database table for all concrete classes (first and second), leaving all fields of first and second test class unpersisted (these can contain stuff like EJBs, jdbc pools, etc). And a bonus question. Is it possible to persist abstract property too? @Entity abstract class Test { @Column @Access(AccessType.PROPERTY) abstract public String getName(); } class SecondConcreteTest extends Test { public String getName() { return "Second Concrete Test"; } }

    Read the article

  • JavaScript sleep

    - by Diazath
    yes, i know - that question has thousands of answers. please, don't tell me about "setTimeout" method becasuse - yes, everything is possible with that but not so easy as using sleep() method. for example: function fibonacci(n) { console.log("Computing Fibonacci for " + n + "..."); var result = 0; //wait 1 second before computing for lower n sleep(1000); result = (n <= 1) ? 1 : (fibonacci(n - 1) + fibonacci(n - 2)); //wait 1 second before announcing the result sleep(1000); console.log("F(" + n + ") = " + result); return result; } if you know how to get the same result using setTimeout - tell me ;) fibanacci is pretty easy task, because there not more than 2 recursions, but how about n-recursions (like fib(1) + fib(2) + .. + fib(n) and sleep after every "+"? nah, sleep would be muuuuuch easier. but still i can't get working example of implementing it. while (curr - start < time) { curr = (...) } is tricky, but it won't work (just stops my browser and then throw all console.logs at once).

    Read the article

  • How to generate, sign and import SSL certificate from Java

    - by Demiurg
    I need to generate a self signed certificates at run time, sign them and import to the Java keystore. I can do this using "keytool" and "openssl" from command line in the following way: keytool -import -alias root -keystore keystore.txt -file cacert.pem keytool -genkey -keyalg RSA -keysize 1024 -alias www.cia.gov -keystore keystore.txt keytool -keystore keystore.txt -certreq -alias www.cia.gov -file req.pem openssl x509 -req -days 3650 -in req.pem -CA cacert.pem -CAkey cakey.pem -CAcreateserial -out reqsigned.pem keytool -import -alias www.cia.gov -keystore keystore.txt -trustcacerts -file reqsigned.pem I can, of course, ship my application with keytool and openssl binaries and execute the above commands from Java, but I'm looking for a cleaner approach which would allow me to do all of the above using pure Java. Any libraries I can use ?

    Read the article

  • Path Inclusion/Global variable not working?

    - by Dan LaManna
    Simply put, my config file includes my database class, and the config file has in it: global $db; $db = new database(DB_HOST, DB_NAME, DB_USER, DB_PASS); That file is root/config.php Moving on to root/functions/func.newpage.php doesn't have any includes/requires, and uses $db-classfunction since the file I'm working with: root/newpage.php - requires the config file, as well as func.newpage.php. However I still come up with: Undefined variable db. Anything you guys are seeing I'm not? Thanks! Let me know if more details are needed.

    Read the article

  • changing default my.cnf path in mysql

    - by user377941
    I am having two mysql instances on same machine. The installations are on /usr/loca/mysql1 and /usr/local/mysql2. I m having separate my.cnf files located in /etc/mysql1 and /etc/mysql2. I installed the first instance of my sql using source distribution and with the --prefix=/usr/local/mysql1 option. The second one i got from copying and pastinf the same directory to /usr/local/mysql2. When i start the mysql daemon on /usr.local/mysql/libexec it reads the my.cnf file in /etc/mysql1. And if i start the mysql daemon in /usr/local/mysql2 it reads the same my.cnf file. I have separate port numbers and .sock files defined in the .cnf file in those 2 locations. I can read the my.cnf file in the second location by using --defaults-file=/etc/mysql2/my.cnf option on mysqld startup. I dnt need to enter this each and every time i start the daemon. If i am going to have more instances how can i point the correct my.cnf file to read to each and every mysql daemon. What is the retionale behind mysqld links with the my.cnf file. how can i predefine the location of my.cnf file for each instance.

    Read the article

  • CSS3PIE: Internet Explorer 6 doesn't download PIE.htc

    - by Jonas
    I'm using the very impressive CSS3PIE (http://css3pie.com) library to add support for CSS3 styles in IE6-8. It works fine in versions 7 and 8 and took a lot of pain out of the process. However, in IE6 no CSS3 styles are shown at all. In fact, looking at the server logs, I can see that IE6 doesn't even download the PIE.htc file, which is necessary for the magic to work. The content type for the file is set correctly as text/x-component, it's referenced by absolute URL, and works fine in IE7 and 8. I'm using Compass (www.compass-style.org) and the PIE helper which makes the CSS look like this: #shopping_cart { behavior: url("/media/static/css/PIE.htc"); position: relative; border-radius: 10px; } I can't figure out what the problem is. Does anyone have any ideas what might cause IE6 to skip the behavior definition altogether? Cheers, Jonas

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >