Search Results

Search found 3300 results on 132 pages for 'david nguyen'.

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

  • Move file or folder to a different folder in google document using api problem

    - by Minh Nguyen
    In Google Document i have a struct: Folder1 +------Folder1-1 +------+------File1-1-1 +------Folder1-2 +------File1-1 Folder2 I want to move "File1-1" to "Folder2" using .Net google api library(Google Data API SDK) public static void moveFolder(string szUserName, string szPassword, string szResouceID, string szToFolderResourceID) { string szSouceUrl = "https://docs.google.com/feeds/default/private/full" + "/" + HttpContext.Current.Server.UrlEncode(szResouceID); Uri sourceUri = new Uri(szSouceUrl); //create a atom entry AtomEntry atom = new AtomEntry(); atom.Id = new AtomId(szSouceUrl); string szTargetUrl = "http://docs.google.com/feeds/default/private/full/folder%3Aroot/contents/"; if (szToFolderResourceID != "") { szTargetUrl = "https://docs.google.com/feeds/default/private/full" + "/" + HttpContext.Current.Server.UrlEncode(szToFolderResourceID) + "/contents" ; } Uri targetUri = new Uri(szTargetUrl); DocumentsService service = new DocumentsService(SERVICENAME); ((GDataRequestFactory)service.RequestFactory).KeepAlive = false; service.setUserCredentials(szUserName, szPassword); service.EntrySend(targetUri, atom, GDataRequestType.Insert); } After run this function i have: Folder1 +------Folder1-1 +------+------File1-1-1 +------Folder1-2 +------File1-1 Folder2 +------File1-1 "File1-1" display in both "Folder1" and "Folder2", and when i delete it from a folder it will be deleted in another folder. (expect: "File1-1" display only in "Folder2") What happen? How can i solve this problem?

    Read the article

  • any way to get sharepoint groups with a given site url

    - by standley-nguyen
    Hi all. I'm getting a stuck. Suppose that I create 5 sites. For each one, I create a few sharepoint groups. So, I create a dropdownlist control to bind 5 sites and when I click on any site there, I will get sharepoint groups created on it. But I always see the dropdownlist used to bind these groups still never change. I mean it only binds a few default groups in sahrepoint everytime. The new created groups is not. And I have confusion like this web.AssociatedGroups web.Groups web.SiteGroups which one we will use this case ? Please guide me Here my snippet code private void BindSPGroupsToDropDownList(DropDownList ddl, string siteUrl) { ddl.Items.Clear(); try { SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(siteUrl)) { using (SPWeb web = site.OpenWeb()) { //web.SiteGroups foreach (SPGroup spGroup in web.Groups) { ddl.Items.Add(new ListItem(spGroup.Name.Trim(), spGroup.ID.ToString())); } } } }); } } thanks in advance

    Read the article

  • how to set BUILD_MAC_SDK_EXPERIMENTAL=1 on Mac 10.7?

    - by Nguyen Minh Binh
    I am building Android OS source on Mac 10.7 follow instructions at: http://source.android.com/source/building.html. Below are the error code when I try to run lunch full-eng BinhNguyens-MacBook:WORKING_DIRECTORY CuongLy$ lunch full-eng 2012-10-04 14:02:58.544 xcodebuild[645:80b] XcodeColors: load (v10.1) 2012-10-04 14:02:58.560 xcodebuild[645:80b] XcodeColors: pluginDidLoad: build/core/combo/HOST_darwin-x86.mk:62: ***************************** build/core/combo/HOST_darwin-x86.mk:63: * Can not find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command build/core/combo/HOST_darwin-x86.mk:69: ***************************** build/core/combo/HOST_darwin-x86.mk:70: * Stop.. Stop. Please tell me how to set BUILD_MAC_SDK_EXPERIMENTAL=1 ?

    Read the article

  • With the attachment_fu rails plugin, is there any way to delete files uploaded to Amazon S3?

    - by Eric Nguyen
    Let's say I'm using attachment_fu to attach profile pics to user profiles in a system, with Amazon S3 used as the actual file storage. When users upload new profile pics, I'd like to replace the attached file with the new one. I can do this within my database (i.e. the file metadata) easily, but attachment_fu doesn't seem to provide methods for deleting the files from S3. Am I missing something, or am I approaching this the wrong way? Many thanks!

    Read the article

  • A good Sorted List for Java

    - by Phuong Nguyen de ManCity fan
    I'm looking for a good sorted list for java. Googling around give me some hints about using TreeSet/TreeMap. But these components is lack of one thing: random access to an element in the set. For example, I want to access nth element in the sorted set, but with TreeSet, I must iterate over other n-1 elements before I can get there. It would be a waste since I would have upto several thousands elements in my Set. Basically, I'm looking for some thing similar to a sorted list in .NET, with ability to add element fast, remove element fast, and have random access to any element in the list. Has this kind of sorted list implemented somewhere? Thanks.

    Read the article

  • rewrite a function using only pointer increment/decrement

    - by Richard Nguyen
    can anyone help me rewrite the function i wrote below using only points and pointer increment/decrement? I dont have much experience with pointer so I dont know what to do. void reverse(char * s) { int i, l = strlen(s); char c; for(i = 0; i < (l >> 1); i++) { c = s[i]; s[i] = s[l - i - 1]; s[l - i - 1] = c; } } do not use pointer arithmetic or array notation. any help or hint on how to rewrite the function above is appriciated. Thanks!

    Read the article

  • How to handle all unhandled exceptions when using Task Parallel Library?

    - by Buu Nguyen
    I'm using the TPL (Task Parallel Library) in .NET 4.0. I want to be able to centralize the handling logic of all unhandled exceptions by using the Thread.GetDomain().UnhandledException event. However, in my application, the event is never fired for threads started with TPL code, e.g. Task.Factory.StartNew(...). The event is indeed fired if I use something like new Thread(threadStart).Start(). This MSDN article suggests to use Task#Wait() to catch the AggregateException when working with TPL, but that is not I want because it is not "centralized" enough a mechanism. Does anyone experience same problem at all or is it just me? Do you have any solution for this?

    Read the article

  • UIWebview handle popup view

    - by Tuan Nguyen
    I've a webpage with one text-box and one button. Click on button will show a popup for searching. On popup page,has 2 buttons, "Search" and "Close". Input the text and click Search, the result will display on a list on this popup, click on a row will close the popup and fill the value to text-box on main-page. On Destop browser, it works fine On Safari on iPad, it will open new tab instead of a popup but work fine. UIWebview in my app, on main-page, click the button, I will go to Search page, but when click Search button and close button, nothing happened, I know because 2 buttons will close the popup or the tab, but I don't know how to handle on my Webview, and also I can fill data to main-page or not? Could anyone point me away? Thanks,

    Read the article

  • change a value xml in php but false with a node name id-7

    - by Nataly Nguyen
    I want to change a xml, but fails with this code. I think mistake with name of variable (ID-1) in php. chang.php <?php include 'example.php'; $xml = new SimpleXMLElement($xmlstr); $xml->ID-1 = '8'; $xml->name = 'Big Cliff'; $xml->asXML('test2.xml'); echo $xml->asXML(); ?> example.php <?php $xmlstr = <<<XML <?xml version="1.0" encoding="utf-8"?> <film> <ID-1>29</ID-1> <name>adf</name> </film> XML; ?>

    Read the article

  • Use a ContextLoaderListener in accordance with DispatchServlet

    - by Phuong Nguyen de ManCity fan
    I want to use both ContextLoaderListener (so that I can pass Spring Beans to my servlet) as well as DispatchServlet (Spring MVC). However, currently I have to pass init param to these both class initializer: <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/app-config.xml </param-value> So, I use the same xml for these both classes. Wonder if it would lead to my beans being initialized twice? If yes, how would I do to avoid that?

    Read the article

  • Exception when click DataGridview tab c#, .Net 4.0

    - by Nguyen Nam
    My winform app have two tab and multi thread, one is main tab and other is log tab. I only use log tab to show logs in a datagridview control. Exception is random occurred when click to log tab (Not click to row or colunm), i have try but can not find anyway to fix it. This is the error log: Message : Object reference not set to an instance of an object. Source : System.Windows.Forms TargetSite : System.Windows.Forms.DataGridViewElementStates GetRowState(Int32) StackTrace : at System.Windows.Forms.DataGridViewRowCollection.GetRowState(Int32 rowIndex) at System.Windows.Forms.DataGridView.ComputeHeightOfFittingTrailingScrollingRows(Int32 totalVisibleFrozenHeight) at System.Windows.Forms.DataGridView.GetOutOfBoundCorrectedHitTestInfo(HitTestInfo& hti, Int32& mouseX, Int32& mouseY, Int32& xOffset, Int32& yOffset) at System.Windows.Forms.DataGridView.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.DataGridView.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Message : Object reference not set to an instance of an object. Source : System.Windows.Forms TargetSite : Void ClearInternal(Boolean) StackTrace : at System.Windows.Forms.DataGridViewRowCollection.ClearInternal(Boolean recreateNewRow) at System.Windows.Forms.DataGridView.OnClearingColumns() at System.Windows.Forms.DataGridViewColumnCollection.Clear() at System.Windows.Forms.DataGridView.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Control.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Control.Dispose(Boolean disposing) at System.Windows.Forms.TabControl.Dispose(Boolean disposing) at System.ComponentModel.Component.Dispose() at System.Windows.Forms.Control.Dispose(Boolean disposing) at System.Windows.Forms.Form.Dispose(Boolean disposing) Update status code: private void updateMessage(int index, string message) { try { this.dgForums.Rows[index].Cells["ColStatus"].Value = message; System.Windows.Forms.Application.DoEvents(); } catch { } }

    Read the article

  • Possible to lock attribute write access by Doors User?

    - by Philip Nguyen
    Is it possible to programmatically lock certain attributes based on the user? So certain attributes can be written to by User2 and certain attributes cannot be written to by User2. However, User1 may have write access to all attributes. What is the most efficient way of accomplishing this? I have to worry about not taking up too many computational resources, as I would like this to be able to work on quite large modules.

    Read the article

  • java overloaded method

    - by Sean Nguyen
    Hi, I have an abstract template method: class abstract MyTemplate { public void something(Object obj) { doSomething(obj) } protected void doSomething(Object obj); } class MyImpl extends MyTemplate { protected void doSomething(Object obj) { System.out.println("i am dealing with generic object"); } protected void doSomething(String str) { System.out.println("I am dealing with string"); } } public static void main(String[] args) { MyImpl impl = new MyImpl(); impl.something("abc"); // --> this return "i am dealing with generic object" } How can I print "I am dealing with string" w/o using instanceof in doSomething(Object obj)? Thanks,

    Read the article

  • How to make c# don't call destructor of a instance

    - by Bình Nguyên
    I have two forms and form1 needs to get data from form2, i use a parameter in form2 constructor to gets form1's instance like this: public form2(Form form1) { this.f = form1; } and in form1: Form form2 = new Form(this); But it seem form1 destruct was called when i closed form1. my question is how can i avoid this problem? EDIT: I have many typing mistakes in my question, i'm so sorry, fixed: I have two forms and form2 needs to get data from form1, i use a parameter in form1 constructor to gets form1's instance like this: private Form f; public form2(Form form1) { this.f = form1; } and in form1: Form form2 = new Form(this); But it seem form1 destruct was called when i closed form2. my question is how can i avoid this problem?

    Read the article

  • Webdevelopment with Jetty & Maven

    - by Phuong Nguyen de ManCity fan
    I find it very frustrating doing web development with Maven & Jetty using Eclipse, compare with what I did using Visual Studio. Everytime I make a change, even a minor change in my view file, (*.jsp, for example), then I have to re-package the whole web - waiting for jetty to reload everything before I can see the change. Is there any better way to do that, some thing like an automatically plugin that will picked that changed files and deploy the changed files to web server?

    Read the article

  • java template design

    - by Sean Nguyen
    Hi, I have this class: public class Converter { private Logger logger = Logger.getLogger(Converter.class); public String convert(String s){ if (s == null) throw new IllegalArgumentException("input can't be null"); logger.debug("Input = " + s); String r = s + "abc"; logger.debug("Output = " + s); return r; } public Integer convert(Integer s){ if (s == null) throw new IllegalArgumentException("input can't be null"); logger.debug("Input = " + s); Integer r = s + 10; logger.debug("Output = " + s); return r; } } The above 2 methods are very similar so I want to create a template to do the similar things and delegate the actual work to the approriate class. But I also want to easily extends this frame work without changing the template. So for example: public class ConverterTemplate { private Logger logger = Logger.getLogger(Converter.class); public Object convert(Object s){ if (s == null) throw new IllegalArgumentException("input can't be null"); logger.debug("Input = " + s); Object r = doConverter(); logger.debug("Output = " + s); return r; } protected abstract Object doConverter(Object arg); } public class MyConverter extends ConverterTemplate { protected String doConverter(String str) { String r = str + "abc"; return r; } protected Integer doConverter(Integer arg) { Integer r = arg + 10; return r; } } But that doesn't work. Can anybody suggest me a better way to do that? I want to achieve 2 goals: 1. A template that is extensible and does all the similar work for me. 2. I ant to minimize the number of extended class. Thanks,

    Read the article

  • How to using String.split in this case?

    - by hoang nguyen
    I want to write a fuction like that: - Input: "1" -> return : "1" - Input: "12" -> return : ["1","2"] If I use the function split(): String.valueOf("12").split("") -> ["","1","2"] But, I only want to get the result: ["1","2"]. What the best way to do this? Infact, I can do that: private List<String> decomposeQuantity(final int quantity) { LinkedList<String> list = new LinkedList<String>(); int parsedQuantity = quantity; while (parsedQuantity > 0) { list.push(String.valueOf(parsedQuantity % 10)); parsedQuantity = parsedQuantity / 10; } return list; } But, I want to use split() for having an affective code

    Read the article

  • Thread resource sharing

    - by David
    I'm struggling with multi-threaded programming... I have an application that talks to an external device via a CAN to USB module. I've got the application talking on the CAN bus just fine, but there is a requirement for the application to transmit a "heartbeat" message every second. This sounds like a perfect time to use threads, so I created a thread that wakes up every second and sends the heartbeat. The problem I'm having is sharing the CAN bus interface. The heartbeat must only be sent when the bus is idle. How do I share the resource? Here is pseudo code showing what I have so far: TMainThread { Init: CanBusApi =new TCanBusApi; MutexMain =CreateMutex( "CanBusApiMutexName" ); HeartbeatThread =new THeartbeatThread( CanBusApi ); Execution: WaitForSingleObject( MutexMain ); CanBusApi->DoSomething(); ReleaseMutex( MutexMain ); } THeartbeatThread( CanBusApi ) { Init: MutexHeart =CreateMutex( "CanBusApiMutexName" ); Execution: Sleep( 1000 ); WaitForSingleObject( MutexHeart ); CanBusApi->DoHeartBeat(); ReleaseMutex( MutexHeart ); } The problem I'm seeing is that when DoHeartBeat is called, it causes the main thread to block while waiting for MutexMain as expected, but DoHeartBeat also stops. DoHeartBeat doesn't complete until after WaitForSingleObject(MutexMain) times out in failure. Does DoHeartBeat execute in the context of the MainThread or HeartBeatThread? It seems to be executing in MainThread. What am I doing wrong? Is there a better way? Thanks, David

    Read the article

  • Array of ArrayList Java

    - by David Bobo
    Hi, I am creating an PriorityQueue with multiple queues. I am using an Array to store the multiple ArrayLists that make up my different PriorityQueues. Here is what I have for my constructor so far: ArrayList<ProcessRecord> pq; ArrayList[] arrayQ; MultiList(){ arrayQ = new ArrayList[9]; pq = new ArrayList<ProcessRecord>(); } The problem comes when I am trying to get the size of the entire array, that is the sum of the sizes of each ArrayList in the array. public int getSize(){ int size = 0; for(int i = 1; i <=9; i++){ size = size + this.arrayQ[i].size(); } return size; } is not seeming to work. Am I declaring the Array of ArrayList correctly? I keep getting an error saying that this.arrayQ[i].size() is not a method. (the .size() being the problem) Thanks for any help! David

    Read the article

  • Visual Studio template not showing

    - by David
    Hi all I've followed this tutorial to try to add a template to Visual Studio: http://www.switchonthecode.com/tutorials/visual-studio-how-to-create-item-templates The template I have created is designed to add one predefined .aspx and one predefined .aspx.cs file to the project. The folder contains the following files: MoosePage.aspx MoosePage.aspx.cs MoosePage.vstemplate MoosePageItemTemplateIcon.ico The .vstemplate file looks like this: <VSTemplate Type="Item" Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"> <TemplateData> <Name>MoosePage</Name> <Description>MoosePage Template</Description> <DefaultName>NewMoosePage</DefaultName> <ProjectType>CSharp</ProjectType> <Icon>MoosePageItemTemplateIcon.ico</Icon> </TemplateData> <TemplateContent> <ProjectItem TargetFileName="$fileinputname$.aspx" ReplaceParameters="true"> MoosePage.aspx </ProjectItem> <ProjectItem TargetFileName="$fileinputname$.aspx.cs" ReplaceParameters="true"> MoosePage.aspx.cs </ProjectItem> </TemplateContent> </VSTemplate> I have zipped the files up (.zip not .zipx) and placed the zip folder in My Documents\Visual Studio 2008\Templates\ItemTemplates\VisualWebDeveloper. I have restarted Visual Studio. When I go into my website project and choose Add New Item, I don't see my new template. Can anyone suggest what might have gone wrong? Thanks David

    Read the article

  • Need advice on OOP philosophy

    - by David Jenings
    I'm trying to get the wheels turning on a large project in C#. My previous experience is in Delphi, where by default every form was created at applicaton startup and form references where held in (gasp) global variables. So I'm trying to adapt my thinking to a 100% object oriented environment, and my head is spinning just a little. My app will have a large collection of classes Most of these classes will only really need one instance. So I was thinking: static classes. I'm not really sure why, but much of what I've read here says that if my class is going to hold a state, which I take to mean any property values at all, I should use a singleton structure instead. Okay. But there are people out there who for reasons that escape me, think that singletons are evil too. None of these classes is in danger of being used anywhere except in this program. So they could certainly work fine as regular objects (vs singletons or static classes) Then there's the issue of interaction between objects. I'm tempted to create a Global class full of public static properties referencing the single instances of many of these classes. I've also considered just making them properties (static or instance, not sure which) of the MainForm. Then I'd have each of my classes be aware of the MainForm as Owner. Then the various objects could refer to each other as Owner.Object1, Owner.Object2, etc. I fear I'm running out of electronic ink, or at least taxing the patience of anyone kind enough to have stuck with me this long. I hope I have clearly explained my state of utter confusion. I'm just looking for some advice on best practices in my situation. All input is welcome and appreciated. Thanks in advance, David Jennings

    Read the article

  • Is there a GUI that I can use to create XML documents based on my schema?

    - by David Conlisk
    Hi all, I want to create a simple graphical user interface to allow non-technical users to create an XML file without having to manually edit the XML source. Ideally I'd like a drag and drop interface, but failing that, anything really. The contents of the XML file are similar to an encoded flow chart of a binary tree, so maybe something like Visio, with a save as xml option? Here's a quick sample of the XML output that is required: <?xml version="1.0" encoding="utf-8"?> <steps> <step id="1" type="prompt"> <prompt> Welcome. </prompt> <next>1.1</next> </step> <step id="1.1" type="question"> <prompt> Do you have what you need? </prompt> <yes>1.2</yes> <no>1.1.1</no> </step> ... </steps> Are there any existing tools out there that you can recommend for this purpose? Ideally open-source or with a free personal license, but I'm interested in hearing about all options. Thanks, David

    Read the article

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