I want to populate a TreeView from SQL database. I have a table with NODE_NAME AND PARENT_NODE columns and the child nodes should b created based on the PARENT_NODE. How can I do this in vb.net?
I am trying to fetch a data from an excel file url on a sharepoint site and put it in a data datatable but getting this error: The input stream is not a valid binary format. The starting contents (in bytes) are: 50-4B................ Here is the code which i am using :- WebClient webClient = new WebClient(); webClient.Credentials = CredentialCache.DefaultNetworkCredentials; byte[] data = webClient.DownloadData("http://sp2010sw127:2000/eur/Home/TestLibrary/Details.xlsx"); MemoryStream memoryStreamOfFile = new MemoryStream(data); BinaryFormatter formatter = new BinaryFormatter(); memoryStreamOfF
There is very good and simple answer for question "how to hide page post using facebook api". Thanks a lot. Question "i want to share friend's post via graph api" still has no answer. How come?! :) Does anybody know how to share Post (via Graph API) from some Page (on any possible destinations: Your timeline, friends timeline, in a group …)?! Any reference to Facebook documentation will be highly appreciated.
In several SO's question there is these lines to access the parent directory of the code, e.g. os.path.join(os.path.dirname(__file__)) returns nothing and os.path.join(os.path.dirname(__file__)) returns nothing import os, sys parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) I understand that os.path.abspath() returns absolute path of something and sys.path.append() adds the path for the code to access. but what is this cryptic line below, what does it really mean? os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pa
When I'm querying a table in schema C from schema A, I'm getting ORA-01031: insufficient privileges and when I'm querying the same table from schema B, I'm getting ORA-00942: table or view does not exist. On the table neither of the schemas are having any privileges. Why am I getting different error messages in this case?
I need to add some JS library to my project and I also want to have ability to update that library from it's repo (that's why I'm adding it as submodule). But I need only on 1 file from that repo to be placed withing my JS directory, whereas library repository contain tests, coffeescript sources and so on, which I do not need in my repository. So the question is - how to add not whole repo as submodule, but single file/directory from it? I suppose this is somehow possible with help of Git Sparse checkouts but not sure if I'm on the right way with this...
I need to add some JS library to my project and I also want to have ability to update that library from it's repo (that's why I'm adding it as submodule). But I need only on 1 file from that repo to be placed withing my JS directory, whereas library repository contain tests, coffeescript sources and so on, which I do not need in my repository. So the question is - how to add not whole repo as submodule, but single file/directory from it? I suppose this is somehow possible with help of Git Sparse checkouts but not sure if I'm on the right way with this...
I'm using facebook-ios-sdk-3.10, Using this SDK I'll login and fetch user details from FB Its working fine for me. This is the code I'm uisng - (IBAction)fbLogin_click:(id)sender { if (AppDelegate.fbsession.state != FBSessionStateCreated) { // Create a new, logged out session. NSArray *permissions = [NSArray arrayWithObjects:@"offline_access", @"email", @"publish_stream", @"read_stream",@"read_friendlists",@"manage_friendlists",@"friends_about_me",@"publish_actions", nil]; // create a session object, with defaults accross the board, except that we provide a custom // instance of FBSessionToken
I try to delete rows with null values at the mail column, if and only if exists a row with a non-null value for the same person_id. DELETE FROM EMP_MAIL EM WHERE MAIL IS NULL AND EXISTS ( SELECT EMP_ID FROM EMP_MAIL EM2 WHERE MAIL IS NOT NULL AND EM.EMP_ID = EM2.EMP_ID ) ; but it takes quite a while. (i have an non-unique index on EMP_MAIL(EMP_ID)) is there a better way to preform this operation ?
Edit: It turns out that this is a custom checksum algorithm, not a CRC-32. For the curious here is a snippet of C code calculating the 21 FF 1D E4 checksum in the below example. I am working with some hex files that seem to be protected by a CRC-32 of sorts, but recalculating using the standard CRC-32 and other known parameters failed to produce a match. All I know is, the data spans 116 bytes and four additional bytes for the checksum. I can produce tons of examples of message-key pairs, I just cannot find any relation between them. I don't want to fill this post with hex dumps so I pasted a
Which is the best way to export a JPA query result in a CSV format? I tried opencsv but it wants a java.sql.ResultSet object and I don't understand how to create it. I tried the following code public ResultSet getAllUsersMap() { String query = "SELECT p from Participant p ORDER BY p.lastName"; ResultSet rs = (ResultSet) em.createQuery(query).getResultList(); return rs; } but I receive the exception java.lang.ClassCastException: java.util.Vector cannot be cast to java.sql.ResultSet
I am new to wordpress and I want the following kind of dropdown menu in my contact form 7. Year <2010>,<2011>,<2012>,<2013>,<2014> Month ...,october,november,december Date ....<27>,<28>,<29>,<30>,<31> Here Year, Month and Date should be visible in dropdown menu but it should not get selected where as the options below that should be able to select Pls suggest me as to how can I achieve this.
I have issue regarding codeigniter Timeout . I know the config folder setting session timeout manually like as l $config['sess_expiration'] = 123; but i need to the website admin manage the session time out dyanamicly in to the admin page please help me how to implement this logic i tried this logic but not working $this->session->sess_expiration = "120"; Note:here i am storing database in the value. based on the database value i can set in to the session expiration time note 1: $config['sess_time_to_update'] = 30; this value less than of session expiration time Total Logic code: public functi
I still do not know how to generate delay in Verilog for synthesis and call it any line in Verilog for synthesis. For finding this, I write code, but it does not work. Please help me if you know how to generate delay and call in any line like a C function. Actually if you tell me why I use for loop here then my answer is I want to move pointer inside for loop until and unless they completes its calculation that I made for delay generation. module state_delay; reg Clk=1'b0; reg [3:0]stmp=4'b0000; integer i,a; always begin #50 Clk=~Clk; end always @(posedge Clk) begin a=1'b1; delay(); a=1'b0; de
there are android:name 3 times, What is difference between them? I started learn Android, so now I am trying to understand Manifest. <activity android:name="com.example.project.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
I want to use a MVC helper to build a grid on the server side but after I want to add and remove rows on the client side. So I use the following wrapper: @(Html.Kendo().Grid<SIGEPos.Models.MyGridViewModel>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.id).Hidden(); columns.Bound(p => p.name).Title("Name").Width(130); columns.Bound(p => p.quantity).Title("Quantity").Width(130); }) .Pageable() .Scrollable(scr=>scr.Height(430)) .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .ServerOperation(false) ) ) And the following markup is generated (only script part shown): <script
For a project we need to investigate an existing installation of IBM Data Stage, doing a whole lot of ETL in loads of jobs. The job flow diagrams contain lots of tables being used a source (both in MSSQL as well as Oracle), as well as a target (mostly in Oracle). My question is now How can I find all database tables used by all jobs in a certain Data Stage Project ? I looked in Tools - Advanced Find, and there I can see all "table definitions". BUT, most of the tables actually used in jobs do not show up there, as they are defined as what Data Stage calls "Parallel Jobs" which in effect are SQ
I am trying to add an Excel sheet named "Temp" at the end of all existing sheets, but this code is not working: Private Sub CreateSheet() Dim ws As Worksheet ws.Name = "Tempo" Set ws = Sheets.Add(After:=Sheets(Sheets.Count)) End Sub Can you please let me know why?
I am facing this problem while accessing web service from ASP.NET application. But the problem occurs when it is hosted in a windows server. When it is hosted in desktop it is working fine. I am calling web service with HttpWebRequest object. Even it is working fine in server from HTML/JavaScript application. Only problem occurs in ASP.NET application hosted in server. I get following error. IIS 8.0 is installed in server. Unable to connect to the remote server System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond afte
I'm running OSX Mavericks and have installed Macports. I installed gcc via Macports which is working fine. However when I type man gcc I only get: No manual entry for gcc I was told I need to add the following to my .bash_profile export MANPATH=/opt/local/share/man:$MANPATH which I have done with no effect. Does Macports actually install the corresponding man pages? The man page for the 'port' command works fine as well as other preinstalled tools like clang. Any help? Cheers.
According to the needs of the experiment, I set the MTU to 8000. After doing this, when I use scp to copy large files, it stalled with 0.00%. I tried scp -l or scp -C and turning tcp_sack on/off, but it still didn't work. And I can't change the MTU size for experiment result comparison. Is there any other way to help?
I have questions regarding the URL path format. A url has a authority and a path. Now the question here is what is with an empty path (no path segments). The following is considered. The leading slash is part of the path. '/' is a path in http.//domain/ A empty path is actually a segment with a empty string as name "". Those two assumption would lead to the following results: A. http.//domain?query, http.//domain#fraction, http.//domain would be legal URL strings B. The following domain path would be extracted for the given domains. http.//domain -> segments = {} http.//domain/ -> segments = {
I have written Verilog code for the square root of a number which is parametrised. If the number of bits are even, the code works. If the number of bits are odd, the code divides the number of bits into groups of two starting from the right (LSB). The first iteration will select the group which has 1 bit starting from the left most bit. I am using a counter to go through the required number of cycles. I do not understand how I should select the group of 1 bit for the first iteration, and 2 for the rest of the iterations.
I am currently trying to convert this php function to javascript: function human_filesize($bytes, $decimals = 2) { $sz = 'BKMGTP'; $factor = floor((strlen($bytes) - 1) / 3); return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; } Here's what I have so Far: function human_filesiz(bytes){ var decimals = 2; var sz = 'BKMGTP'; var factor = Math.floor((bytes.length - 1) / 3); return (bytes / Math.pow(1024, factor)); //return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; } Im Just struggling with the last line. Any Help Greatly Appreciated.
I am having trouble putting this code together. My main code is a state machine. It adds 2 numbers together = sum then loads A to add A to sum (sum=a+sum) after clock is reached. It then divides by n bit. I'm having Lots of trouble assigning outputs. What is legal and what is not am I able to set the regs equal to each other sometimes I feel like I can do that and some other times I cannot. If I use the module, can the input be an output and vice versa? I posted my whole code because I wanted to get it to work. I think my device is correct, but I need to create a testbench to test it. module A
Goto was unexpected at this time in a batch file - summary = pre-parsing of batch file led to error when a variable was undefined. Eliminating preparsing allowed the program to work as anticipated.
I am trying to create an Infopath form to submit and change data in a Sharepoint Server List. If I have the form submit to a Sharepoint Server Form Library, it works perfectly fine. I followed the step-by-step instructions to submit a form to a list at the following: http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx That guide's results is exactly what I would need. The list comes out great in the Infopath form, however, when I try to test it and submit the form, I get an error. If I preview and try to fill out the form from within Infopath (after publish
This has been possible up to .Net4.0 and IIS 7.5. The general idea is that you enable anonymous and forms authentication for your intranet site and in a subdirectory you enable windows authentication together with forms authentication and turn off anonymous. By disabling the forms 401 => 302 redirection with some custom code you will be able to get a hold of the users username and domain. If you google for a solution all roads seem to lead to this blog/solution: http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/ However when upgrading to .net
Scenario: I want to input data from textbox into the database based on microsoft data base (.mdb) I already searching and find good clue and my result was here. This Code below was inside command button click event: using (OdbcConnection conn= new OdbcConnection()) { conn.ConnectionString = @"Driver={Microsoft Access Driver (*.mdb)};" + "Dbq=C:\\BlaBlaBla.mdb;Uid=Admin;Pwd=;"; conn.Open(); using (OdbcCommand cmd = new OdbcCommand( "INSERT INTO TABLENAME (FIELD1,FIELD2,FIELD3) VALUES ('" + txtFIELD1Input.Text + "','" + txtFIELD2Input.Text + "','" + txtFIELDInput.Text + "' )", conn)) { cmd.Execu