C

22K

Solutions

13K

Contributors

C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. By design, C provides constructs that map efficiently to typical machine instructions, so it has found lasting use in applications that had formerly been coded in assembly language, including operating systems as well as various application software for computers ranging from supercomputers to embedded systems. It is distinct from C++ (which has its roots in C) and C#, and many later languages have borrowed directly or indirectly from C.

Share tech news, updates, or what's on your mind.

Sign up to Post

X = 1   2
       3   4

y = 3   1
       4   2
how can i convert x to y????
0
What does it mean to be "Always On"?
LVL 4
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

I am testing the authorized.net captureprviouslyauthorizedamount i can get an transaction type as authorization only but can not get the capture amount. it is saying invalied transaction id. Do i need to change from test to production and than cancel the credit card amount
0
A  wonderful new day.

Am wriiting a window service application in C# and its supposed to call  a C programme from its OnStart() function.

My question is this :

(1 ) Can i develop a C WIN32API in Visual Studio 2017, if yes, how can i please.

(2) Starting from the OnStart() function  how  do i call the C application


Thank you
0
Hello ,


Any body knows a sample for re-calculate checksums and drop packets on netfilter module ?

Thank you
0
How to write test case for c program
0
Hello ,

We are building an IDS/IPS/Waf system that reads the packets from PF_Ring and apply rules to IPTables / Netfilter / Ntuple .
That software needs to access to userspace for iptables and kernelspace for netfilter. So we already pipe the both side.
But our main concern is about the performace issue. Time is our biggest enemy and need to solve the problem in mikro / mili seconds.
So where is the best place working area for our  main core of software for performance ? kernel area or user area ? and why .

Thanks for information
0
Hello ,

I want to know if there is a possible way to apply BPF filter to drop packets on netfilter  


Thank you



#define __KERNEL__
#define MODULE
#include <linux/ip.h>             
#include <linux/kernel.h> 
#include <linux/module.h> 
#include <linux/netdevice.h>      
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h> 
#include <linux/skbuff.h>         
#include <linux/udp.h>      

#include <linux/ip.h>


              
static struct nf_hook_ops netfilter_ops;                        
static unsigned char *ip_address = "\x5D\xBB\xCD\x73"; 
static char *interface = "p1p2";                          
unsigned char *port = "\x00\x17";                       
struct sk_buff *sock_buff;                              
struct udphdr *udp_header;                              
unsigned int main_hook(unsigned int hooknum,
                  struct sk_buff **skb,
                  const struct net_device *in,
                  const struct net_device *out,
                  int (*okfn)(struct sk_buff*))
{
  if(strcmp(in->name,interface) == 0){ return NF_DROP; }  
  struct iphdr* iph = ip_hdr(skb);
  if(iph->saddr == *(unsigned int*)ip_address){ return NF_DROP; }   
        
        
        
	/**sock_buff = *skb;
	if(!sock_buff){ return NF_ACCEPT; }                   
	if(!(iph)){ return NF_ACCEPT; }              
	if(iph->protocol != 17){ return NF_ACCEPT; }                 
	udp_header = (struct udphdr *)(sock_buff->data + (iph->ihl *4)); 
	

Open in new window

0
Hello

Is there any body knows ready to use sub routine when we send an array it will draw sth. like that :

value |-------------------------------------------------- count
    0 |                                                     32167
    1 |                                                      9999
    2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  1723569
    4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@                        973472
    8 |@@@                                                 111055
   16 |                                                     14777
   32 |                                                       376
   64 |                                                       585
  128 |                                                        19
  256 |                                                         0
  512 |                                                         0

Open in new window

0
curl_easy_setopt (curl, CURLOPT_CAINFO, ".\\cacert.pem"); //https://curl.haxx.se/libcurl/c/CURLOPT_CAINFO.html

Having major issues trying to resolve this error.

-----Curl Readable Error Text...-----
error setting certificate verify locations:
CAfile: .\cacert.pem
CApath: noneProblem with the SSL CA cert (path? access rights?)-------------------------------------
"      char [100000]
CURLE_SSL_CACERT_BADFILE

it does not matter what I try this still failed I am sending a secure Endpoint. The normal endpoint work.
0
//************************** tracks indexs*******************
/*
each track saved in sd card has index , so to play track number we will using it's index 
for example to play track number 1 we will using "00003"  index which will send to play track function 
all the same for the rest of all tracks 
*/ 
char buffer15[6]={"00001"};  // track 15 index 
char buffer16[6]={"00002"};  // track 16 index
char buffer1[6]={"00003"};   // track 1 index
char buffer2[6]={"00004"};   // track 2 index
char buffer3[6]={"00005"};   // track 3 index
char buffer4[6]={"00006"};   // track 4 index
char buffer5[6]={"00007"};   // track 5 index
char buffer6[6]={"00008"};   // track 6 index
char buffer7[6]={"00009"};   // track 7 index
char buffer8[6]={"00010"};   // track 8 index
char buffer9[6]={"00011"};   // track 9 index
char buffer10[6]={"00012"};  // track 10 index
char buffer14[6]={"00013"};  // track 14 index

//*************************

Open in new window


How can I access these mp3files via filename not index
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE
LVL 4
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Hi, new member here and first post. My goal is to create a basic tab control using the Win32 API that contains a canvas for rendering OpenGL. Please see attachment for my source code. I created a tab control with two tabs; the first tab contains a button and the second tab contains the rendering context. The first tab, when active, successfully displays a button. The second tab, when active, does not display the OpenGL canvas. The only way I can get the canvas to appear in the GUI is to exclude the tab control (comment out the CREATE_TAB_PANE macro in my example to do this). I am rendering the OpenGL context within a static control. Thanks in advance for your help.
OpenGlTabWin32.cpp
0
Hi,

I am using window application. I want to use some cell in the columns as watermark text.

What is the syntax for that and how can we set this function in Win App c#.

My code :

 if ((dtGrid1[1,cnt].Value != null))
 {
                        dtGrid1[2,cnt].ReadOnly = false;
                        dtGrid1[2,cnt].value = "Enter" // Here i want watermark text for Enter
                        dtGrid1[2,cnt].Style.BackColor = Color.DarkGray;
                        dtGrid1.UpdateCellValue(2,cnt);
 }
0
what is c language?what is it's necessity.?
0
Hi,

This is Ravi...

So far I read everything mentioned above...so I request you to provide one end to end example to do the same... because I am completely new to it...
0
I am in the process of moving legacy codes in c to Intel 64 (ksh) from Unix Tru64 (ksh).  
 I created a basic hello world application in c so I could setup the debugger.   INTEL has instructed me to use the gdb-ia debugger.   I don't know where any manuals are to read this for myself.   I have gotten a few errors along the way that have lead me to add the following lines to my ksh users .profile.  
 export LD_LIBRARY_PATH=/opt/intel/debugger_2017/libipt/intel64/lib
 export PYTHONHOME=/usr
 Currently I am getting an error:  $>gdb-ia ImportError: No module named site
 With every question I ask INTEL, it takes me a business day to get an answer.  So, I've had great luck with Experts Exchange in the past, so I'm back to get some direction.  
 My last correspondence with INTEL was:  
      "Looks like you forgot to source the environment."
        "#source /opt/intel/bin/compilervars.sh intel64"

 Where am I going to add this line of code?   The "#source" makes me think it would go into an include file somewhere.   Can anyone see through this and give me some advice???
 I also have another post out there for mapping Tru64 compiler options to INTEL.  

 Thanks everyone for your help!
0
I have following version of eclipse installed in my computer:

Eclipse IDE for C/C++ Developers

Version:  Neon.1a Release (4.6.1)
Build id:  2016 1007-1200

From main menu, I go to Window  -   Preferences  -  Indexer   but Indexer doesn't run ?

I need to run Indexer so I can navigate my source code.
0
Attached is data dump of some example symbol "ast".  This symbol starts at address 0x0000 6814.

What is oriented display and what is line break at 2 power x ?
Orient-Display.PNG
0
Hi
I am connecting GSM(SIM 800) module to my PC through serial to USB. I want send SMS to GSM module by PC .
using COM4 port serial communiction in PC(windows 7).
I tried writing this code
#include<stdio.h>// include stdio . h
#include<stdlib.h>// include stdlib . h
void initialize_GSM_modem(void);
void initialize_serialcommunication(void);
unsigned char Command_CMGF[]="AT+CMGF=1\r";
// AT+CMGF for selecting Text Mode
unsigned char CtrlZ=0x1A;
// CTRL+Z for sedning SMS after the message has been entered
unsigned char Command_CMGS[]="AT+CMGS =+9233385xxxxx\r";
// recepient mobile number
unsigned char Command_AT[]="AT\r";
unsigned char msg02[]="Hello!";
void main (void) {
initialize_GSM_modem();
initialize_serialcommunication();
while (1) {
;
}
}
void initialize_GSM_modem(void){
delay2();
puts(Command_AT);
delay2();
puts(Command_CMGF);
delay2();
puts(Command_CMGS);
delay2();
puts(msg02);
delay2();
}
void initialize_serialcommunication(void){
 HANDLE hCom;
 DCB dcb;
BOOL fSuccess;
   TCHAR *pcCommPort = TEXT("COM4"); //  Most systems have a COM1 port

   //  Open a handle to the specified com port.
   hCom = CreateFile( pcCommPort,
                      GENERIC_READ | GENERIC_WRITE,
                      0,      //  must be opened with exclusive-access
                      NULL,   //  default security attributes
                      OPEN_EXISTING, //  must use OPEN_EXISTING
                      0,      //  not overlapped I/O
                      NULL ); //  

Open in new window

0
Cross compiling a program - compiler creates the object file but the native linker is being used and failing.
I am feeding the linker as a command line argument to make (as LD).

How do I specify an alternate linker?

Thank you.
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I have been up the last three nights being paged about high cpu usage on AIX 7.1
I can run nmon the press c then press u and nmon displays the top cpu processes/programs

is there a way to run that in a script and capture the output?

any help would be appreciated
I have tried several options to put the info in a file but cannot get the output desired
the summary of top cpu when running the command includes
PID %CPU ResSize Char Command - don't really need the Char column
0
Hello All,

I have been trying to get some assistance and received various inputs in one of the earlier question to run a .bat file on multiple servers.
Below is the steps I want to execute:

a. We have 109 server (Windows 2012 Server)
b. There is a batch file in D drive with same name and location on all 109 servers
c. I want to run that particular batch file on all servers in one go
Usually when I login to my session using credentials and launch the batch file, multiple command prompt windows start loading. When I used PSexec script it works for individual machine but there too I had a challenge... If my PC gets locked the batch file fails and stops.

All I am looking here is to run that particular batch file on all servers and if I login to my session I should see it has started. I want the batch file to run under by login session. Please help as this is very critical to be completed ASAP.

Let me know if any more information required.
1
flow chart tower of hanoi graphical representation in c language and flowchart of  stack how to use of tower of hanoi
0
Hey..
  i want to create an image file of C drive of my server .. with all S\W ... When i run that iso file or create neew server at that time with all application it must be get installed .. is it possible ... pplz help ..
0
Within Outlook, I can navigate through a number of screens to eventually see the Certificate Properties screen for a single user.

Selecting the Details tab and choosing the Subject field, it displays these lines:

CN=
OU=
O=
C=

Each is followed by a specific value.

Using VBA code, how can I read the values that are displayed here?

I read somewhere these may be stored in the Global Address List (GAL), so I am including those words too just in case.

Thanks!


Dennis
0
how to fetch date from pgsql  by using pro*c
0

C

22K

Solutions

13K

Contributors

C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. By design, C provides constructs that map efficiently to typical machine instructions, so it has found lasting use in applications that had formerly been coded in assembly language, including operating systems as well as various application software for computers ranging from supercomputers to embedded systems. It is distinct from C++ (which has its roots in C) and C#, and many later languages have borrowed directly or indirectly from C.