Using PDO's odbc to connect to a MSSQL server instance with Windows Authentication

I'm trying to connect to a MSSQL database using PDO with odbc. I'm aware that there's a package SqlSrv (but for some reason that package (.dll) won't load properly). So I found some documentation arguing it's also possible with PDO. In my P

Python OAuth WooCommerce

I am trying to use a WooCommerce Python client to make a POST request butI get Provided Signature does not matchThe client I use is from: WooCommerce API OAuth in pythonThis is my client:#!/usr/bin/env pythonimport requestsimport randomimpo

Cannot invoke filter with an argument list of type ((_) -> _)

Im trying to filter by title. Im getting this errorclass Incident { var title: String = }if sender.text != { self.incidents = incidents.filter { $0.title.rangeOfString(sender.text, options: NSStringCompareOptions.CaseInsensitiveSearc

Wicket basic implementation of wizard steps

is there any basic implementation wicket 6.20 provides for a step overview functionality like in this picture or like this if the other won't work?When looking at the documentation I couldn't find anything close to it, so I started by doing

SQL Increment column value in select statement

I'm trying to write a Select statement that increments a column value by 50, but the range can end up being 200,000 so I can't do it all in a case statement manually.Something similar to this, but instead of manually writing the incrementsS

@GeneratedValue(strategy = GenerationType.IDENTITY) does not work with @EmbeddedId

I am new to Hibernate and need some help here. Previously I had only 1 primary key and I used the @GeneratedValue(strategy = GenerationType.IDENTITY) to create a sequence in my database.Now, I have changed to composite primary keys using @E

Why cant I set TextView to display incoming call phone number?

I have an app that replaces the standard incoming call screen with my own design. When someone calls, my custom screen pops up. This is good, but for some reason, my app fails to display the incoming phone number. The incoming phone number

Creating CodeMemberMethod from string

I am trying to generate some code using CodeDom. I wanted to know if there is any way to create CodeMemberMethod from a string.I found a method, but it generates assembly from string. I wanted to generate some methods from string. Is there

Generic conversion method throw InvalidCastException

I want to implement same simple generic conversion method but on runtime I am getting an error. So the scenario is quite simple. I have same service that return me list of items of type External. I have my own WrapperExternal class that sim

System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached

I just updated to the latest ASP.NET MVC and I am getting:Method not found: 'System.Web.Routing.RouteValueDictionary System.Web.WebPages.TypeHelper.ObjectToDictionaryUncached(System.Object)'. Description: An unhandled exception occurred d

Delete from two tables in one statement

I want to be able to remove all data from 2 tables where the id of a user = the id given. I am using Java, Derby DB, Netbeans 7.3 Beta 2 and OS X Mountain Lion.I have two tables (sorry about the huge image):This is my statement so far:Strin

const char* in my class has junk character(s) after it's returned from function

Class:class myclass { public: myclass(void); const char* server; private: char pidchar[6]; int pidnum;};The functionmyclass parseINI(const char* file){ myclass iniOptions; CSimpleIniA ini; ini.SetUnicode(); ini.Loa

Highlighting text using Html.fromHtml

I am trying to add background color for the string inside MultiAutoCompleteTextView.I am overriding replaceText method in multipleAutocompletetextview, trying to replace charactersequence with html like this@Overrideprotected void replaceTe

Rest Api Post request

I cannot seem to get this to work for me ,I have seen this in other posts and was hoping someone may be able to spot what im doing wrong.I am trying to get the body of a request to this rest api but cannot seem to pull back what i need and

Service stack arrayof to be removed

I have my dto defined as[DataContract(Name = Tuner, Namespace = )]public class TunerDto{ [DataMember(Name = TunerName, Order = 1)] public string TunerName { get; set; }}and I am returning an array of theses which gives my XML in the

How to keep Android Layout consistent across various devices?

I am new to Android Programming, I just published an app on playstore and found out that few buttons that I put in my layout doesn't show up on some of the devices. How do I make sure it is consistent across various devices?Should I avoid u

C Programming output text file

Hi I just started programming and have a beginner question:I would like to better understand how the fprint()function work because sometimes when I create a text file with it, I realized there are various types of file eg.(read only, append

How to append '\\\\?\\' to the front of a file path in Python

I'm trying to work with some long file paths (Windows) in Python and have come across some problems. After reading the question here, it looks as though I need to append '\\?\' to the front of my long file paths in order to use them with o

Return value of function in C

int ret(char *){ //nothing }int main(void){ printf(%d\n,ret(foo));}Why does the Function ret returns a garbage value ???andint my_strlen(char *s){ if(*s) return 1 + my_strlen(s + 1); // or my_strlen(s+1) + 1;}in the above fun

Qt convert translated text to english

My Qt application supports dynamic translation IE the user can change languages whilst the application is runningNow I have a need to find the English equivalent of a translated string and don't seem to be able to find a way For exampleGive

How to set up a table display in iTextpdf

I have an application that I want to print an invoice like document in a table setup. Each line in the table will be from a separate document from a database. The iteration through the Db is not an issue but I want it to display something l

Query column with char data type in oracle

I have the following case:Sample code: create table abc(aa char(10)); insert into abc values('ABC'); --ABC will be padded with 7 blank spaces Issue: Select * from abc where aa in ('ABC'); --This a

Proper way to create ostream to file or cout

I am trying to create a Log class for my project at school. It needs to either be able to write information to the stdout or to a file depending on the parameters it is passed. I was looking into how to do this and I stumbled upon a threa

How to call a method when it's masked by an invocable property?

Disclaimer: I know this example is sort of ridic; just want to know what the language will allow me to do if this bizarre situation were ever to come up.Consider the following short example:var anonymous = new { ToString = new Func

how to convert a float into binary using struct.unpack?

I'm trying to convert a float into binary. I'm using the module struct. For instance, with the value of 3.5, when I execute this line :struct.pack('>f',3.5)I get this :b'@`\x00\x00'I suppose the two x00 x00 represent hexadecimal values for

 2092    1 2 3 4 5 6 7 8 9 10 下一页 尾页