How to compile cli-clock on cygwin using Makefile? - c

I wrote ggc clock.c -o clock assuming that it would compile to the file "clock" but apparently not. I do see it comes with a Makefile except I'm not quite sure on how you use that.
Here's the link to what i'm using.
https://github.com/Unixhub/cli-clock
clock.c:6:21: ncurses.h: No such file or directory
clock.c:54: error: parse error before "WINDOW"
clock.c:54: warning: no semicolon at end of struct or union
clock.c:56: warning: data definition has no type or storage class
clock.c:68: error: parse error before '*' token
clock.c:68: warning: data definition has no type or storage class
clock.c: In function `init':
clock.c:89: error: request for member `bg' in something not a structure or union
clock.c:95: error: `stdscr' undeclared (first use in this function)
clock.c:95: error: (Each undeclared identifier is reported only once
clock.c:95: error: for each function it appears in.)
clock.c:99: error: `OK' undeclared (first use in this function)
clock.c:100: error: request for member `bg' in something not a structure or union
clock.c:102: error: request for member `bg' in something not a structure or union
clock.c:102: error: request for member `bg' in something not a structure or union
clock.c:103: error: request for member `bg' in something not a structure or union
clock.c:103: error: request for member `option' in something not a structure or union
clock.c:104: error: request for member `option' in something not a structure or union
clock.c:104: error: request for member `bg' in something not a structure or union
clock.c:115: error: request for member `running' in something not a structure or union
clock.c:116: error: request for member `geo' in something not a structure or union
clock.c:117: error: request for member `geo' in something not a structure or union
clock.c:118: error: request for member `geo' in something not a structure or union
clock.c:119: error: request for member `geo' in something not a structure or union
clock.c:120: error: request for member `geo' in something not a structure or union
clock.c:121: error: request for member `geo' in something not a structure or union
clock.c:122: error: request for member `tm' in something not a structure or union
clock.c:122: error: request for member `lt' in something not a structure or union
clock.c:123: error: request for member `lt' in something not a structure or union
clock.c:127: error: request for member `framewin' in something not a structure or union
clock.c:127: error: request for member `geo' in something not a structure or union
clock.c:128: error: request for member `geo' in something not a structure or union
clock.c:129: error: request for member `geo' in something not a structure or union
clock.c:130: error: request for member `geo' in something not a structure or union
clock.c:131: error: `LINES' undeclared (first use in this function)
clock.c:131: error: request for member `geo' in something not a structure or union
clock.c:132: error: `COLS' undeclared (first use in this function)
clock.c:132: error: request for member `geo' in something not a structure or union
clock.c:133: error: request for member `framewin' in something not a structure or union
clock.c:135: error: request for member `framewin' in something not a structure or union
clock.c: In function `signal_handler':
clock.c:149: error: request for member `running' in something not a structure or union
clock.c: In function `update_hour':
clock.c:158: error: request for member `tm' in something not a structure or union
clock.c:158: error: request for member `lt' in something not a structure or union
clock.c:159: error: request for member `lt' in something not a structure or union
clock.c:161: error: request for member `tm' in something not a structure or union
clock.c:164: error: request for member `date' in something not a structure or union
clock.c:165: error: request for member `date' in something not a structure or union
clock.c:168: error: request for member `date' in something not a structure or union
clock.c:168: error: request for member `tm' in something not a structure or union
clock.c:169: error: request for member `date' in something not a structure or union
clock.c:169: error: request for member `tm' in something not a structure or union
clock.c:172: error: request for member `date' in something not a structure or union
clock.c:172: error: request for member `tm' in something not a structure or union
clock.c:173: error: request for member `date' in something not a structure or union
clock.c:173: error: request for member `tm' in something not a structure or union
clock.c: In function `draw_number':
clock.c:189: error: request for member `framewin' in something not a structure or union
clock.c:190: error: request for member `framewin' in something not a structure or union
clock.c:192: error: request for member `framewin' in something not a structure or union
clock.c: In function `draw_clock':
clock.c:200: error: request for member `date' in something not a structure or union
clock.c:201: error: request for member `date' in something not a structure or union
clock.c:204: error: request for member `framewin' in something not a structure or union
clock.c:205: error: request for member `framewin' in something not a structure or union
clock.c:206: error: request for member `framewin' in something not a structure or union
clock.c:209: error: request for member `date' in something not a structure or union
clock.c:210: error: request for member `date' in something not a structure or union
clock.c:213: error: request for member `framewin' in something not a structure or union
clock.c:214: error: request for member `framewin' in something not a structure or union
clock.c:215: error: request for member `framewin' in something not a structure or union
clock.c:218: error: request for member `date' in something not a structure or union
clock.c:219: error: request for member `date' in something not a structure or union
clock.c: In function `clock_move':
clock.c:224: error: request for member `framewin' in something not a structure or union
clock.c:224: error: request for member `geo' in something not a structure or union
clock.c:224: error: request for member `geo' in something not a structure or union
clock.c: In function `key_event':
clock.c:231: error: request for member `option' in something not a structure or union
clock.c:232: error: `stdscr' undeclared (first use in this function)
clock.c:235: error: request for member `running' in something not a structure or union
clock.c: In function `main':
clock.c:247: error: request for member `option' in something not a structure or union
clock.c:247: error: `COLOR_BLUE' undeclared (first use in this function)
clock.c:248: error: request for member `option' in something not a structure or union
clock.c:250: error: request for member `running' in something not a structure or union
clock.c:259:2: warning: no newline at end of file

Cygwin is large and only a small part of it is usually installed by default. The rest is divided into separately installed packages.
You need to add at least the libncurses-devel package, and possibly others. Run setup.exe, answer the usual questions, type ncurses in the search line, select the last version of libncurses-devel, continue with the installation.
If there's a Makefile, type make in the directory where it resides. This will run the build process.
Note that nothing whatsoever is guaranteed unless the program was tested in Cygwin.

Related

PHP PDO Select Format AS Too few parameters

I have the following code:
$extracting = $dbNew->query("SELECT *, Format(Date_Sheet, 'Short Date') AS modifiedDate FROM AccessDB WHERE modifiedDate LIKE '%2021%'");
Having the following error:
Fatal error: Uncaught PDOException: SQLSTATE[07002]: COUNT field incorrect: -3010 [Microsoft Access Driver] Too few parameters. Expected 1.
The problem is the "modifiedDate" because if I replace it with the "Date_Sheet" access field after the database table, I can run the query without issues.
Thank you in advance!

Syntax Error in Azure Data Factory SOQL Query WHERE LastModifiedDate >= datetime

I'm working in Azure Data Factory V2, attempting to query from a Salesforce object where the LastModifiedDate in the object is greater than or equal to a recent date. I've been receiving syntax errors on extremely simple SOQL queries, queries that work just fine in Salesforce Workbench. Below, I've listed examples of queries I've run in the ADF Copy Data activity, along with the errors I received when debugging the pipeline.
Query 1
Select Id from "Object" WHERE LastModifiedDate >=
#{formatDateTime(activity('Yesterday').output.firstRow.Yesterday,'yyyy-MM-ddTHH:mm:ssZ')}
Result 1
{
"errorCode": "2200",
"message": "Failure happened on 'Source' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:\nSOQL error: [Microsoft][Salesforce] (30) Syntax error or access violation when parsing SOQL.\nSQL error: [Microsoft][SQLEngine] (31480) syntax error near 'Select Id from \"Object\" WHERE LastModifiedDate >= 2018-08-13T16<<< ??? >>>:05:06Z'.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:\nSOQL error: [Microsoft][Salesforce] (30) Syntax error or access violation when parsing SOQL.\nSQL error: [Microsoft][SQLEngine] (31480) syntax error near 'Select Id from \"Object\" WHERE LastModifiedDate >= 2018-08-13T16<<< ??? >>>:05:06Z'.,Source=Microsoft Salesforce ODBC Driver,'",
"failureType": "UserError",
"target": "Event Fix Pipeline"
}
Query 2
SELECT Id FROM "Object" WHERE LastModifiedDate >= 2018-08-14T00:00:00Z
Result 2
{
"errorCode": "2200",
"message": "Failure happened on 'Source' side. ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:\nSOQL error: [Microsoft][Salesforce] (30) Syntax error or access violation when parsing SOQL.\nSQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM \"Object\" WHERE LastModifiedDate >= 2018-08-14T00<<< ??? >>>:00:00Z'.,Source=Microsoft.DataTransfer.ClientLibrary.Odbc.OdbcConnector,''Type=System.Data.Odbc.OdbcException,Message=ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure:\nSOQL error: [Microsoft][Salesforce] (30) Syntax error or access violation when parsing SOQL.\nSQL error: [Microsoft][SQLEngine] (31480) syntax error near 'SELECT Id FROM \"Object\" WHERE LastModifiedDate >= 2018-08-14T00<<< ??? >>>:00:00Z'.,Source=Microsoft Salesforce ODBC Driver,'",
"failureType": "UserError",
"target": "Event Fix Pipeline"
}
What could be causing this syntax error?
Removing the quotation marks around Object seems to solve your problem.
SELECT Id FROM Object WHERE LastModifiedDate >= 2018-08-14T00:00:00Z.
I tested the query with quotation marks in Salesforce Developer Console and got "Unknown error parsing query", so I believe it's an invalid SOQL query with the quotation marks.
Lol, In my case it was a semicolon at the end of the SOQL statement.

how do I get the parent name in MDX query

I am trying to get the parent name of my agent list in the same row as the agency code, but I can't seem to get the right coding in the with member section
current code:
with
member Measures.[Parent Name] as [Agent].[Agency_View].[Agency Agent].currentmember.parent
select
{Measures.[Parent Name],
[Measures].[Costs],
[Measures].[Revenue]} on columns,
[Agent].[Agency_View].[Agency Agent] on rows
from
[Distribution]
but all I get in the Parent Name column is #Error
VALUE #Error Query (2, 34) The CURRENTMEMBER function expects a hierarchy expression for the 1 argument. A member expression was used.
I have also tried:
as [Agent].[Agency_View].[Agency Agent].currentmember.properties("Agency Market")
as [Agent].[Agency_View].[Agency Agent].currentmember.Parent.Member_Caption
as [Agent].[Agency_View].[Agency Agent].currentmember.hierarchy.name
as ancestor([Agent].[Agency_View].[Agency Agent].currentmember,1)
as [Agent].[Agency_View].[Agency Agent].currentmember.parent.name
as [Agent].[Agency_View].[Agency Agent].currentmember.parent.Member_Caption
Any other things for me to try?
If you ever get a #Error cell in SSMS then double click it to get a better error.
In this case, I believe your Member_Caption attempt was close but you were trying to run the CurrentMember function on a level object not a hierarchy. Please try the following:
member Measures.[Parent Name] as [Agent].[Agency_View].CurrentMember.Parent.Member_Caption

!= OR <> OR NOT IN Operators Supports in ODATA?

i have the query for external object named as test__x.
I am writing the query to get the data using OData 4.0 in external data sourse by applying the NOT EQUAL TO logic with != OR <> OR NOT IN operators then facing an error stating as below.
SQL:
select id,status__c from current_year_order_summary__x where status__c NOT IN('C') LIMIT 2000
Error:
"Error received from the external system: 500:
com.informatica.cloud.api.adapter.runtime.exception.ReadException:
java.sql.SQLException: [Teradata Database] [TeraJDBC 15.10.00.14]
[Error 3707] [SQLState 42000] Syntax error, expected something like a
'SUCCEEDS' keyword or a 'MEETS' keyword or a
'PRECEDES' keyword or an 'IN' keyword or a
'CONTAINS' keyword between the word 'status__c ' and
'|'."
In OData 4, the equality and inequality operators are eq and ne.

Not able to compile apache2.4.17 with mod_fastcgi

I am trying to compile apache 2.4.17 with FastCGI , i googled various tutorials and most of tutorials contained an command to include and patch from the following link https://github.com/ByteInternet/libapache-mod-fastcgi .
So instead of including their patch i downloaded their fork of FASTCGI and tried to compile against it and i am getting the following error
mod_fastcgi.c:2848: warning: passing argument 5 of 'ap_log_rerror_' makes integer from pointer without a
mod_fastcgi.c:2848: warning: passing argument 6 of 'ap_log_rerror_' from incompatible pointer type
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2863: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2863: warning: passing argument 5 of 'ap_log_rerror_' makes integer from pointer without a
mod_fastcgi.c:2863: warning: passing argument 6 of 'ap_log_rerror_' from incompatible pointer type
mod_fastcgi.c: In function 'check_access':
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2909: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2909: warning: passing argument 5 of 'ap_log_rerror_' makes integer from pointer without a
mod_fastcgi.c:2909: warning: passing argument 6 of 'ap_log_rerror_' from incompatible pointer type
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'log' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'connection' in something not a structure or union
mod_fastcgi.c:2923: error: request for member 'server' in something not a structure or union
mod_fastcgi.c:2923: warning: passing argument 5 of 'ap_log_rerror_' makes integer from pointer without a
mod_fastcgi.c:2923: warning: passing argument 6 of 'ap_log_rerror_' from incompatible pointer type
I have googled this error and its an conversion error of pointer to struct
but i am not able to figure out what to change in the mod_fastcgi.c file
I am running Centos 5.8
This is the batch script code i am using to compile
tar -zxf mod_fastcgi.tar.gz
cd mod_fastcgi
cp Makefile.AP2 Makefile
echo $MAIN_SRC/$APACHE2
make top_dir=$MAIN_SRC/$APACHE2
make install top_dir=$MAIN_SRC/$APACHE2
can any one help me debug this as i am trying from many hours still with no success . I also tried to compile with the default tar from fastcgi.com still got the same errors
Instead of using the mod_fastcgi which is available from http://fastcgi.com , i compiled using the mod_fcgid which is available from apache .
Here is the link https://httpd.apache.org/download.cgi .
Here is the commands i used :
tar -zxf mod_fcgid.tar.gz
cd mod_fcgid
APXS = path/to/apxs ./configure.apxs

Resources