file-handling

Can anyone help me with my library catalog C program?

别来无恙 提交于 2019-12-13 06:48:28
问题 I need to use BST and file handling but I'm stuck with this one because the displayCatalog function doesn't seem to work. I want to establish the struct first before I print it to the file. How do I go about this? #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<Windows.h> typedef struct book catalog; FILE *fx,*fy; struct book{ char title[20]; char author[20]; int isbn[15]; char genre[10]; char publisher[20]; int year[5]; char synopsis[100]; catalog *left;

Upload Data To Server IPhone

这一生的挚爱 提交于 2019-12-13 05:48:24
问题 I want to develop an iPhone app that allows the User to take and save a photo within the app. Furthermore the user only is allowed to upload the image to server if data like "title", "location" and "additional information" is entered. If done so, the image and the belonging data should be uploaded to my webserver. I have already build an app that retrieves data from a server, so building a connection will not be the problem. Since I'm new to web servers my question is what would be the best

How to read all data from .lbl file

萝らか妹 提交于 2019-12-13 04:32:48
问题 I have One lable file which contain barcode sticker n its values, I want to read that file and copy that file, So ,I am using below function. Its work, but its very time consuming..!! So, do u have any idea how to read all the data of lbl file rather than read data bit by bit which i am doing. So , i can increse my performance. public void storeLbl(string path) { lblData = ""; using (BinaryReader b = new BinaryReader(File.Open(path, FileMode.Open))) { int pos = 0; int length = (int)b

Text File Handling with SQL Database - Visual Basic

南楼画角 提交于 2019-12-13 01:23:09
问题 I have a text file contains delimited records. 1243;jhhf';982u4k;9u2349;huf8 kij;9238u;98ur23;jfwf;03i24 I need to replace the value of 4th part of every record with the value returned from SQL database ( Select X from T where C='4Th part from the flatfile' ). Regards, SAnthosh. 回答1: Try this: Dim newLines As List(Of String) = New List(Of String) Dim sqlConn As New SqlConnection(connectionString) Dim SQLCmd As New SqlCommand() SQLCmd.Connection = sqlConn Dim lines As String() = File

Nodejs Read very large file(~10GB), Process line by line then write to other file

自作多情 提交于 2019-12-12 13:12:42
问题 I have a 10 GB log file in a particular format, I want to process this file line by line and then write the output to other file after applying some transformations . I am using node for this operation. Though this method is fine but it takes a hell lot of time to do this. I was able to do this within 30-45 mins in JAVA, but in node it is taking more than 160 minutes to do the same job. Following is the code: Following is the initiation code which reads each line from the input. var path = '.

How to Write Multiple Rows/Arrays to CSV File in one attempt using PHP? [closed]

跟風遠走 提交于 2019-12-12 09:46:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have to write multiple records in csv file. I'm using fputcsv function of php which take array as one row and write it in the file. In this way there will be multiple write operations for each row. I'm looking for a method with which I can write multiple rows in one write

whether tellp() not defined in append mode?

纵然是瞬间 提交于 2019-12-12 09:41:33
问题 I was experimenting with file pointers in C++. In below code, the result obtained is 0, 30, 10 and 12. So it means that tellp() does not give correct result in append mode if we do seekp(). I was expecting tellp() to give me 32 after seekp() and appending data. I understand that in app mode, writing is always to the end and hence got this doubt. Does the result mean that tellp() position does not matter in append mode? The contents of h1.txt file is : 01234567891011121314151617181911 and is

C Win32: save .bmp image from HBITMAP

落花浮王杯 提交于 2019-12-12 08:24:39
问题 I am working with a framegrabber and need to get the images from computer memory and save them on an image file. after trying for couple of days I end up with the following 2 functions, which creates a file and windows OS is able to run the .bmp file, but the bitmap file is black (the image size is 900KB , 640*480). does any body has any idea why, the picture is in black? here are the two functions : LPSTR CreateBMP( HWND hAppWnd, int nImageType ) { void * pWinGBits = NULL; int i; Z

Java List Object instead of an Array

╄→гoц情女王★ 提交于 2019-12-12 04:27:06
问题 I hava a Java map like this: Map<String, Object> data = new HashMap<String, Object>(); And I am performing following operation on it: data.put("case_ids", new int[] { 31527 }); Where case_ids is one of the attribute of 3rd party API. However, that API throws incorrect API request error and suggests me to use List object instead of an Array for: data.put("case_ids", new int[] { 31527 }); Not an expert of List, any suggestions? Like data.put("case_ids", new List[] { 31527 }); ? EDITED :

Issue With Encryption Function Not Linking To Main

微笑、不失礼 提交于 2019-12-12 04:18:57
问题 For the purpose of education, I'm writing a small pair of functions which open a file as a binary file, read each character one at a time, change the value of said character and write to a new, encrypted file. (Note, this isn't true encryption per se.) For some reason, I'm getting this error message in my debugger at the while-loop condition: Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) I suspect the issue is with understanding pointer. Here is my program in it's entirety. Thanks ahead of