Search Results

Search found 121 results on 5 pages for 'cris hong kong crishk'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Backup of images

    - by Sam Kong
    I've just installed a Ubuntu for a file server. It will share a folder (samba) and employees of my company will save photos on that. Currently the total amount of the photos is about 100GB and every day 20MB will be added. My question is about backup plan. I want to backup the photos to a remote server using a cron job. I can think of 2 things. rsync git Image files won't be changed so rsync will do. But as people say, I must git all my data. What would you do? Thanks. Sam

    Read the article

  • How do I send emails in Java?

    - by Cris Carter
    Hey. I currently want to develop a simple program in Java that sends out email. Not just a few emails, but actually a lot (10k+) I have a subscribers list that all agree to it, by the way. Anyway, I cannot send these emails via Gmail or anything like that - They do not allow that many emails to be sent. So the basic question is: How do I send emails by making the actual sending computer an email server? I'm sure I should use some libraries, I heard about ChillKat or something like that. Could anyone explain / help me out? Would be very much appreciated.

    Read the article

  • GWT JsonpRequestBuilder Timeout issue

    - by Anthony Kong
    I am getting time out from using JsonpRequestBuilder. The entry point code goes like this: // private static final String SERVER_URL = "http://localhost:8094/data/view/"; private static final String SERVER_URL = "http://www.google.com/calendar/feeds/[email protected]/public/full?alt=json-in-script&callback=insertAgenda&orderby=starttime&max-results=15&singleevents=true&sortorder=ascending&futureevents=true"; private static final String SERVER_ERROR = "An error occurred while " + "attempting to contact the server. Please check your network " + "connection and try again."; /** * This is the entry point method. */ public void onModuleLoad() { JsonpRequestBuilder requestBuilder = new JsonpRequestBuilder(); // requestBuilder.setTimeout(10000); requestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback()); } class Jazz10RequestCallback implements AsyncCallback<Article> { @Override public void onFailure(Throwable caught) { Window.alert("Failed to send the message: " + caught.getMessage()); } @Override public void onSuccess(Article result) { // TODO Auto-generated method stub Window.alert(result.toString()); } The article class is simply: import com.google.gwt.core.client.JavaScriptObject; public class Article extends JavaScriptObject { protected Article() {}; } The gwt page, however, always hit the onFailure() callback and show this alert: Failed to send the message. Timeout while calling <url>. Fail to see anything on the Eclipse plugin console. I tried the url and it works perfectly. Would appreciate any tip on debugging technique or suggestion

    Read the article

  • GWT: How can I use JsonpRequestBuilder to handle a Json response of a list

    - by Anthony Kong
    My backend server function returns a list of json object to the caller. I would like to use JsonRequestBuilder to interact with this backend function I defined a AsyncCallback this way class MyCallBack extends AsyncCallback<List<MyObject>> { However, JsonpRequestBuilder does not this declaration AsyncCallback because the generic type is bounded to <T extends JavaScriptObject. List<MyObject does not satisfy this requirement. Do you have any suggestion to this problem?

    Read the article

  • Question about Java File Reader.

    - by Cris Carter
    Hello. I'm having some problems with the FileReader class. How do I specify an offset in the lines it goes through, and how do I tell it when to stop? Let's say I want it to go through each line in a .txt file, but only lines 100-200 and then stop? How would I do this? Right now I'm using ReadLine() but I don't think there's a way to specify offset with that. Any fast help is VERY appreciated. Thanks.

    Read the article

  • How do I run different threads in Java?

    - by Cris Carter
    Hey. I'm having some problems with threads. I understand how they work, but since they all use the same method, how do I run different threads that do completely different things, but at the same time? To me, it seems that they always use the same standard method which makes them do the same thing. So, let's say I have a big .txt file where I want to go through each line and do something to the line. In this case, I would like to have each thread do 1/10th of the .txt file, but I don't understand how the threads can communicate with each other, and how they could organize so each thread does the right part? Could anyone explain or help me with this? Would be very much appreciated!

    Read the article

  • How to design a grid containing TextView in Android

    - by Cris
    Hello, i need to realize an app for Android using this background image: Over every cell i have to draw a TextView, but i don't know how to do it with the different screens; i have the background image with 3 resolutions (240x320, 320x480, 480x800) but i don't know what kind of layout to use; i would use GridView but i don't know if i can work with different column size. Can anyone help me? Thanks in advance

    Read the article

  • calling jQuery function from Flash

    - by Cris
    Hi, i have a problem only with IE: if i try to invoke a JS function from Flash using ExternalInterface i cannot get result if Flash is embedded inside a JQuery dialog; when i make the same thing from a normal html page it runs. How can i invoke ExternalInterface.call to run a function even if flash is inside a dialog? Thanks in advance C.

    Read the article

  • Virtual machines on USB external disk

    - by Cris
    Hello, i'm thinking about installing (using Sun Virtual Box) Ubuntu 10.04 and Windows7 on external disk connected to USB port of my new MacBook; do you think perfomances will be terrific? Have you tried something similar? Thanks in advance ! c.

    Read the article

  • UIImages on UITableView?

    - by babu Kong
    what is the best method to display about 300 png images into a UITableView.. i dont wanna display them at the same time... i have 3 tableViewControllers that will each display about 100 imgaes.. (its for a catalog so the images are important to display) i used [uiimage imageNamed:] but that method caches the images and they dont get released so the memory usage is big.... is there any way to release the cache when the nav controller pushes a different view controller? i also tried [uiimage alloc] initWithContentsOfFile] but the images wont display.... any help?

    Read the article

  • Java: Handling cookies when logging in with POST

    - by Cris Carter
    I'm having quite some trouble logging in to any site in Java. I'm using the default URLconnection POST request, but I'm unsure how to handle the cookies properly. I tried this guide: http://www.hccp.org/java-net-cookie-how-to.html But couldn't get it working. I've been trying basically for days now, and I really need help if anyone wants to help me. I'll probably be told that it's messy and that I should use a custom library meant for this stuff. I tried downloading one, but wasn't sure how to get it set up and working. I've been trying various things for hours now, and it just won't work. I'd rather do this with a standard URLconnection, but if anyone can help me get another library working that's better for this, that would be great, too. I would really appreciate if someone could post a working source that I could study. What I need is: POST login data to site - Get and store the cookie from the site - use cookie with next URLconnection requests to get logged-in version of the site. Can anyone help me with this? Would be EXTREMELY appreciated. It really does mean a lot. If anyone wants to actually help me out live, please leave an instant-messenger address. Thank you a lot for your time.

    Read the article

  • How to modify by loading and saving the same xml file

    - by cynthia hong
    I have a problem with modifying xml file when i first load and then save it with same file path and name. Below is my code. The error is "Access to the path C:\MyApp\Web.config is denied. If i change the path of the xdoc.Save to be different from xdoc.Load, then it will be ok. What is your recommandation to solve this problem? If possible, i need to modify the existing xml file(meaning xml file for loading and saving is the same path). XmlDocument xdoc = new XmlDocument(); xdoc.Load(@"C:\\MyApp\\Web.config"); XmlNode xn = xdoc.SelectSingleNode("//configuration/MyProvider"); XmlElement el = (XmlElement)xn; el.SetAttribute("defaultProvider", "MyCustomValue"); xdoc.Save(@"C:\\MyApp\\Web.config"); Thanks in advance.

    Read the article

  • Getting Google results in Java? Need help!

    - by Cris Carter
    Hello. Right now, I'm trying to get the results from Google in Java, by searching for a term. I'm using a desktop program, not an applet. That in itself isn't complicated. but then Google gave me a 403 error. Anyways, I added referrer and User Agent and then it worked. Now, my problem is that I don't get the results page from Google. Instead, I get their script which gets the results page. My code right now simply uses a GET request on "http://www.google.com/search?q=" + Dork; Then it outputs each line. Here is what I get when I run my program: <.!doctype html<.head<.titledork - Google Search<./title<.scriptwindow.google={kEI:"9myaS-Date).getTime()}}};try{}catch(u){}window.google.jsrt_kill=1; align:center}#logo{display:block;overflow:hidden;position:relative;width:103px;height:37px; <./ script<./div Lots of stuff like that. I shortened it (A LOT) and put in dots to fit it here. So my big question is: How do I turn this whole mess into the nice results page I get when searching Google with a browser? Any help would be seriously appreciated, and I really need the answer fast. Also, please keep in mind that I do NOT want to use Google's API for this. Thanks in advance!

    Read the article

  • Pasting images in TinyMCE on rails app

    - by Sam Kong
    Hi, I found a weird problem with TinyMCE editor. Copying & pasting images from another domain works fine but if the images are on the same domain the path are relative but not correct sometimes. I figured out that the problem is related to the rails URL scheme. Example) Images are copied from http://mydomain.com/index.html page and the real images path is http://mydomain.com/photos/image.jpg. Editor page: http://mydomain.com/posts/new = image path is set as ../photos/image.jpg http://mydomain.com/posts/edit/123 = image path is set as ../../photos/image.jpg So I tried http://mydomain.com/posts/new/ and it worked. How do I solve this problem? Thanks. Sam

    Read the article

  • Linq to SQL query error

    - by Tom Kong
    public class Service1 : IService1 { [OperationContract] public List<decmal> GetEnterCounts(DateTime StartTime, DateTime EndTime) { var db = new FACT_ENTER_EXIT(); return (from e in **db.ENTER_CNT** where StartTime < db.DATE_ID && db.DATE_ID > EndTime select e).ToList(); } } Ok, so I have this database FACT_ENTER_EXIT containing the field ENTER_CNT (nullable = false, type = decimal) which I want to return as a list VS2010 spits out the following error at 'db.ENTER_CNT': Error 1 Could not find an implementation of the query pattern for source type 'decimal'. 'Where' not found. I must be missing something, could someone please point out where I'm going wrong?? Thanks in advance, Tom

    Read the article

  • Rails 2.3 session

    - by Sam Kong
    Hi, I am developing a rails 2.3.2 app. I need to keep session_id for an order record, retrieve it and finally delete the session_id when the order is completed. It worked when I used cookies as session store but it doesn't for active_record store. (I restarted my browser, so no cache issue.) I know rails 2.3 implements lazy session load. I read some info about it but am still confused. Can somebody clarify how I use session_id for such a case? What I am doing is... A user make an order going through several pages. There is no sign-up, neither login. So I keep session_id in the order record so that no other user can access the order. @order = Order.last :conditions = {:id = params[:id], :session_id = session[:session_id] } When the order is finished, I set nil to session_id column. How would you implement such a case in lazy session(and active_record store) environment? Thanks. Sam

    Read the article

  • Passenger error message I can't figure out

    - by Sam Kong
    Hi, I am testing Rails 3 on DreamHost which just installed Rails 3. I created a simple controller and it failed. Browser shows 500 error (Internal Server Error) and the log shows the following message. Could not find i18n-0.5.0 in any of the sources Try running `bundle install`. *** Exception EOFError in spawn manager (Unexpected end-of-file detected.) (process 17951): from /dh/passenger/lib/phusion_passenger/utils.rb:306:in `unmarshal_and_raise_errors' from /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:71:in `spawn_application' from /dh/passenger/lib/phusion_passenger/rack/application_spawner.rb:41:in `spawn_application' from /dh/passenger/lib/phusion_passenger/spawn_manager.rb:159:in `spawn_application' from /dh/passenger/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application' from /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__' from /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop' from /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' from /dh/passenger/bin/passenger-spawn-server:61 [ pid=13245 file=ext/apache2/Hooks.cpp:727 time=2010-12-24 12:13:38.287 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/cp_rails3/sites/rails3.codepremise.com': The spawn server has exited unexpectedly. Backtrace: in 'virtual boost::shared_ptr<Passenger::Application::Session> Passenger::ApplicationPoolServer::Client::get(const Passenger::PoolOptions&)' (ApplicationPoolServer.h:471) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:523) It runs fine in console (app.get "url") and also ok with "rails server". What's wrong? Thanks. Sam

    Read the article

  • ORM: why should i use it?

    - by Cris
    Hello, i develop since many years in SQL (many different sql servers like Oracle, MSSql, Mysql) and i always been happy in doing that. I've recently seen a lot of stuff around ORMs and i'm asking why should i move toward this world. Can you give me some good points for spending time in learning a different way to do what i already do today? Thanks in advance c.

    Read the article

  • TinyMCE Editor acts weird on IE

    - by Sam Kong
    Hi, I use TinyMCE and it works fine on FireFox but it shows weird icons on IE 8.0. As you can see, forecolor and backcolor icons are repeated. This doesn't happen on FF. Has anybody seen this? How do I fix this? Sam

    Read the article

  • How do I refresh TinyMCE for the code that I add with JavaScript

    - by Sam Kong
    Hi, I need to insert code for flash to TinyMCE with JavaScript. If I insert the same code using HTML menu of TinyMCE, it automatically add flash icon to the editor. But if I insert the code using JavaScript, the actual code is inserted but it shows nothing on the screen. One trick I found is toggle TinyMCE to normal textarea and back to TinyMCE. Then, it shows the flash icon. Is there a better way to do that? Thanks. Sam

    Read the article

  • htaccess to change url

    - by Guo Hong Lim
    I have the following code in my .htacess but it didn't work right. Is it because mod-rewrite is no "on", if so, how can i check? Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)\$ $1.php [nc] I wanted to rename my address, example: http://www.abc.com - http://www.abc.com http://abc.com - http://www.abc.com http://www.abc.com/123.html - http://www.abc.com/123 http://www.abc.com/12-12-12.html - http://www.abc.com/12-12-12 http://subdomain.abc.com/123.html - http://subdomain.abc.com/123 Basically removing the extension and ensuring that its www is intact.

    Read the article

  • issue about Concept of JFrame, JLabel and ContentPane

    - by Sun Hong Kim
    I just study window programming with awt. I see through several codes but I can not get concepts of JFrame, JLabel and ContentPane. I think JFrame only make outer Frame. ContentPane is container that contain JLabel that has contents(text, button, radio etc...). I don't know this is correct T.T Why I ask this is I failed combine the contents. I can not make TextField and InternalFrame at a time. I want to know the concept. I hope you take my question right.

    Read the article

  • Group variables in a boxplot in R

    - by tao.hong
    I am trying to generate a boxplot whose data come from two scenarios. In the plot, I would like to group boxes by their names (So there will be two boxes per variable). I know ggplot would be a good choice. But I got errors which I could not figure out. Can anyone give me some suggestions? sensitivity_out1 structure(c(0.0522902104339716, 0.0521369824334004, 0.0520240345973737, 0.0519818337359876, 0.051935071418996, 0.0519089404325544, 0.000392698277338341, 0.000326135474295325, 0.000280863338343747, 0.000259631566041935, 0.000246594043996332, 0.000237923540393391, 0.00046732650331544, 0.000474448907808135, 0.000478287273678457, 0.000480194683464109, 0.000480631753078668, 0.000481760272726273, 0.000947965771207979, 0.000944821699830455, 0.000939631071343889, 0.000937186900570605, 0.000936007346568281, 0.000934756220144141, 0.00132442589501872, 0.00132658367774979, 0.00133334696220742, 0.00133622384928092, 0.0013381577476241, 0.00134005741746304, 0.0991622968751298, 0.100791399440082, 0.101946808417405, 0.102524244727408, 0.102920085260477, 0.103232984259916, 0.0305219507186844, 0.0304635269233494, 0.0304161055015213, 0.0303742106794513, 0.0303381888169022, 0.0302996157711171, 1.94268588634518e-05, 2.23991225564447e-05, 2.5756135487907e-05, 2.79997917298194e-05, 3.00753967077715e-05, 3.16270817369878e-05, 0.544701146678523, 0.542887331601984, 0.541632986366816, 0.541005610554556, 0.540617004208336, 0.540315690692195, 0.000453386694666078, 0.000448473414508756, 0.00044692043197248, 0.000444826296854332, 0.000445747996014684, 0.000444764303682453, 0.000127569551159321, 0.000128422491392669, 0.00012933662856487, 0.000129941842982939, 0.000129578971489026, 0.000131113075233758, 0.00684610571790029, 0.00686349387897349, 0.00687468164010565, 0.00687880720347743, 0.00688275579317197, 0.00687822247621936), .Dim = c(6L, 12L)) out2 structure(c(0.0189965816735366, 0.0189995096225103, 0.0190099362589894, 0.0190033523148514, 0.01900896721937, 0.0190099427513381, 0.00192043989797585, 0.00207303208721059, 0.00225931163225165, 0.0024049969048389, 0.00252310364086785, 0.00262940166568126, 0.00195164921633517, 0.00190079923515755, 0.00186139563778548, 0.00184188171395076, 0.00183248544676564, 0.00182492970673969, 1.83038731485927e-05, 1.98252671720347e-05, 2.14794764479231e-05, 2.30713122969332e-05, 2.4484220713564e-05, 2.55958833705284e-05, 0.0428066864455102, 0.0431686808647809, 0.0434411033615353, 0.0435883377765726, 0.0436690169266633, 0.0437340464360965, 0.145288252474567, 0.141488776430307, 0.138204532539654, 0.136281799717717, 0.134864952272761, 0.133738386148036, 0.0711728636959696, 0.072031388688795, 0.0727536853228245, 0.0731581966147734, 0.0734424337399303, 0.0736637270702609, 0.000605277151497094, 0.000617268349064968, 0.000632975679951382, 0.000643904422677427, 0.000653775268094148, 0.000662225067910141, 0.26735354610469, 0.267515415990146, 0.26753155165617, 0.267553498616325, 0.267532284594615, 0.267510330320289, 0.000334158771646756, 0.000319032383145857, 0.000306074699839994, 0.000299153278494114, 0.000293956197852583, 0.000290171804454218, 0.000645975219899115, 0.000637548672578787, 0.000632375486965757, 0.000629579821884212, 0.000624956458229123, 0.000622456283217054, 0.0645188290106884, 0.0651539609630352, 0.0656417364889907, 0.0658996698322889, 0.0660715073023965, 0.0662034341510152), .Dim = c(6L, 12L)) Melt data: group variable value 1 1 PLDKRT 0 2 1 PLDKRT 0 3 1 PLDKRT 0 4 1 PLDKRT 0 5 1 PLDKRT 0 6 1 PLDKRT 0 Code: #Data_source 1 sensitivity_1=rbind(sensitivity_out1,sensitivity_out2) sensitivity_1=data.frame(sensitivity_1) colnames(sensitivity_1)=main_l #variable names sensitivity_1$group=1 #Data_source 2 sensitivity_2=rbind(sensitivity_out1[3:4,],sensitivity_out2[3:4,]) sensitivity_2=data.frame(sensitivity_2) colnames(sensitivity_2)=main_l sensitivity_2$group=2 sensitivity_pool=rbind(sensitivity_1,sensitivity_2) sensitivity_pool_m=melt(sensitivity_pool,id.vars="group") ggplot(data = sensitivity_pool_m, aes(x = variable, y = value)) + geom_boxplot(aes( fill= group), width = 0.8) Error: "Error in unit(tic_pos.c, "mm") : 'x' and 'units' must have length > 0" Update Figure out the error. I should use geom_boxplot(aes( fill= factor(group)), width = 0.8) rather than fill= group

    Read the article

  • [OpenCV] cvFilter2D works very very slow in Ubuntu 9.10 amd64?

    - by Hong
    Hi, has someone tried the cvFilter2D under 64bit linux? Recently when I was trying to port some code to the amd64 version of Ubuntu 9.10, I just found that the cvFilter2D works really slow. The version is Opencv 2.0. The code is as follows: CvMat *mat_src = cvCreateMat(128, 128, CV_32FC1); CvMat *mat_dest = cvCreateMat(128, 128, CV_32FC1); CvMat* mat_kernel = cvCreateMat( 25, 25, CV_32FC1); // initialization ... cvFilter2D( (CvMat*)mat_src, (CvMat*)mat_dest, (CvMat*)mat_kernel, cvPoint( (25-1)/2, (25-1)/2)); // I needs approximately 100ms to finish that... My CPU is Intel 2.4G However, the Opencv 1.1pre only cost me 3ms for the same code...

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >