Forum Replies Created

Abhey Member

For Android there is a lack of a serious IDE and the lack of the advanced features present in it. You will have a lot of problems without having the right tools. An app made the right way, is not code only. There are other components to add and Android is not the best environment. If you plan getting serious about programming, you have to use a PC sadly.

Technically an API is an Application Programming Interface: you have YouTube and it gives you some functions to get data. The set of those functions is the YouTube’s API.

You have a laptop with Android? Are you sure that it’s not a tablet? What model do you have?
AndroidKickStartR is not an API: the API is the interface that you will use, not the thing itself.

Maven is a build tool: it’s a tool that will build the package and will deal with the dependencies. Thanks to Maven you need to, once the configuration has been provided, only press a button to start building your project. It’s not a compiler but it’s a tool telling how and what to compile to the real compiler.

I don’t know it and couldn’t also find anything on the Internet.
What builder are you referring to?

The quantity may not be important as much as the quality: if you are mixing terminology then you have to learn. Core terminology should come natural.
Tools are meant to be used for a task. To get the job done is not a precise task, so there is not a large choice of libraries and frameworks geared toward getting the job done. It all depends on the task. A good video library is not a good alarm clock.

If you need to create a small game, what use will jsoup have? The search of libraries has sense if you know what to do. Java is not like JavaScript where there are frameworks that could be used for everything. In Java and the other programming languages, you find libraries with a task in mind, not the contrary.

Yes, correct. The thing I was referring to was the API, that is the thing you got confused on.

AIDE is the most acclaimed.

Abhey Member

You can simply edit the return value and bypass the check.

If you delete that function, you need to edit every part of the code in which it’s called. Editing a return value is preferable to editing a lot more parts of code. For larger functions you must also check that the function will do other things beside the return value. A function may be used for things outside its return value.

Abhey Member

try putting the asp:HyperLink .


your div contents go here..
 

if the NavigateUrl is empty, there won’t be any link/mousehover effect. You could also use native html5 anchor tag instead of asp hyperlink too.

Abhey Member

Building an application for Android device is really not the same as building an application for a desktop.

I want to create an Xamarin app to upload data to a SQL database from an Android device

Local storage or to a database available somewhere from the cloud?

Local = http://developer.xamarin.com/guides/cross-platform/application_fundamentals/data/

Full database requires the use of services = `http://developer.xamarin.com/guides/cross-platform/Application_Fundamentals/Web_Services/
`

Abhey Member

If there is a login that intercepts user stuff and it hasn’t been updated, it can cause problems. Theme My Login lagged behind reality for several weeks.

Abhey Member

Latest version of WordPress changed the user system a bit. The password is no longer emailed to user, instead they get the link to create a new password.

Abhey Member

Basic HTTP Authentication from VBA
http://ramblings.mcpher.com/Home/excelquirks/snippets/basicauth

Also: Excel 2007: use VBA to download & save CSV from URL
https://social.msdn.microsoft.com/Forums/en-US/bd0ee306-7bb5-4ce4-8341-edd9475f84ad/excel-2007-use-vba-to-download-save-csv-from-url

The following requires Internet Explorer but will download a file in VBA:

Dim myURL As String
myURL = "http://www.somesite.com/file.csv"

Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False
WinHttpReq.Send

myURL = WinHttpReq.ResponseBody
If WinHttpReq.Status = 200 Then
    Set oStream = CreateObject("ADODB.Stream")
    oStream.Open
    oStream.Type = 1
    oStream.Write WinHttpReq.ResponseBody
    oStream.SaveToFile ("C:\file.csv")
    oStream.Close
End If
Abhey Member

keep the file handle open for as less time as possible in case if it is a shared resource. If it involves pretty straightforward and small amount of string processing it might still not create any problems. But if you plan to do more string processing and formatting after reading each line and if file can contain lot of records then it would be ideal that you read the entire file into a string. And the perform all the string processing and formatting in memory without keeping the file handle open for the entire time when string processing is done. It depends on how the file is updated by other clients

Abhey Member

That part of your code with string concatenation is odd – what are you doing there and why?

Using a cursor (which is essentially and generally what you’re doing when you’re iterating a ResultSet) is certainly not without overhead. The only way to avoid overhead would be if results were cached in memory.

Abhey Member

Sounds pretty obscure but derivation may work. However A:B and AA:B are not the same and the two C’s aren’t the same either.

Have the two B’s implement the same interface that contains one or two initialization functions. Is it something you are looking for?

The hardcore way is to exploit reflection but hard to tell more from this skeleton.

Abhey Member

Just find that as long as we allow even to access login page, a connection is already established and they can easily also DDoS using bot machines without attempting to brute force to fatigue your server memory resource – it is more than just the normal SYN flood but can be type of Slowloris, Slow HTTP POST DoS having HTTP connection to be established and not duly tear down … they can also intentionally force user account lockout…

Ideally a CDN like Cloudflare or appl delivery controller can act as fronting or reverse proxy separately beyond the Web server. The Web appl FW is definitely worth considering – including Mod security (even if it is using a plugin for Apache server) that go beyond to deep dive into rules that inspect HTTP literals etc.

Abhey Member

There are two distinct sorts of variables, reference types and value types. Reference types are eg. classes which are reused. Value types are simple variables (eg. int, bool, string) and structures, these are not reused. Assigning a different value to a class means the original variable is modified – even if you have added it to some collection elsewhere.

You need to understand this behavior not just to solve this problem but to help you in making code that functions as you want in future.

Abhey Member

You need to create a new ErrorMsgs instance for each error message, otherwise you are modifying the same object. just adding the same reference (pointer) to the list each time. The referenced object of course contains the last value only then.

Abhey Member

If i keep inputting a negative answer it keeps repeating which i want
but if i run the program from the beginning and input a vale >0 for V0 it jsut falls through and gives an answer for theta without asking for the x value

g=9.81
V0=0

V0=input ('Enter initial velocity of projectile (m/s):')
while (V0<0)
disp ('Error. Velocty must be greater than 0');

V0=input ('Enter initial velocity of projectile (m/s):')
if (V0>0)
x=input ('Enter target location in X direction (>0m):')
theta=(asin(x*g/V0^2))/2;
end
end
 theta
Abhey Member

I can’t help with the avi control but here’s how to position the mouse and force a double-click. (from MSDN)
First Abstract
This article explains how to position the mouse pointer over a specific control in a Microsoft® Visual Basic® application.
Positioning the Mouse Pointer
Sometimes you may need to position the mouse pointer over a specific control in a Microsoft® Visual Basic® application, even though that control does not have the current focus.
To position the mouse pointer over a specific control, you need to use the Microsoft Windows® application programming interface (API) GetWindowRect and SetCursorPos functions. The GetWindowRect function is used to retrieve the coordinates of a control. The Declare statement for the GetWindowRect function is:

Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect
As RECT) As Long

The GetWindowRect function requires two arguments. The first argument is the handle of the control. The second argument is the address of a RECT structure.
After calling the GetWindowRect function, the control's coordinates are stored in the RECT structure. The RECT structure is defined as:

Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type
  

Note that the left, top, right, and bottom positions of the control are stored in the RECT structure. After you know the exact position of the control, you need to use the SetCursorPos function to position the mouse pointer directly over the control. The Declare statement for the SetCursorPos function is:

 
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long,
   ByVal y As Long) As Long
  

Then, to position the mouse pointer over the control, you retrieve the coordinates of the control's upper-left corner by using the values stored in the Left field and Top field of the RECT structure. Next, you call the SetCursorPos function with these two values to actually position the mouse pointer over the control.
Example Program
This program shows how to move the mouse pointer over a specific control.
1.Create a new project in Visual Basic. Form1 is created by default.
2.Add the following Declare statements to the General Declarations section of Form1 (note that each Declare statement must be typed as a single line of code):

Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect
   As RECT) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As
   Long) As Long
  

3.Add the following code to the Form_Load event for Form1:

Private Sub Form_Load()
    Dim MousePos As RECT

    Call GetWindowRect(Command2.hwnd, MousePos)
    Call SetCursorPos(MousePos.Left, MousePos.Top)
End Sub
  

4.Add a Command Button control to Form1. Command1 is created by default. Set its Default property to False.
5.Add a second Command Button control to Form1. Command2 is created by default. Set its Default property to True.
6.From the Visual Basic Insert menu, select Module to create a new module. Module1.Bas is created by default.
7.Add the following Type structure to Module1.Bas:

Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
  
Run the example program by pressing F5. Notice that the focus is set to the first Command Button control, but the mouse pointer is positioned over the second Command Button control. In short, the mouse pointer is placed over the control whose Default property is set to True.

Second Abstract
This article explains how to allow the user of your Microsoft® Visual Basic® application use the ENTER key, instead of double-clicking with the mouse, to select a directory.
Using the ENTER Key to Select Directories

The Microsoft® Visual Basic® Directory List Box control displays a list of all directories stored on the specified disk drive. You can select a specific directory to work with by double-clicking its entry in the control. The selected directory can then be manipulated by your Visual Basic application.

You may, however, want to select a directory from the Directory List Box control by pressing the ENTER key instead of double-clicking with the mouse. This functionality can be accomplished by monitoring the KeyPress event of the Directory List Box control.

Whenever a key is pressed on the keyboard, a KeyPress event is triggered in the control that has the focus. A special number representing that particular key is stored in the KeyPress event's KeyAscii variable. You can then test the KeyAscii variable to determine whether a specific key, such as ENTER, was pressed on the keyboard.

In the example program below, each time a KeyPress event is triggered, the focus is set to the Directory List Box control. The KeyAscii variable is then tested to determine whether ENTER (represented by the number 13) was pressed. Next, a WM_LBUTTONDBLCLK (double-click) message is sent to the Directory List Box control by using the Microsoft Windows® application programming interface (API) SendMessage function. 

The KeyAscii variable is then set to a value of zero, which prevents the beep from being played on the computer's speaker. Finally, the default directory is changed to the newly selected directory.

Example Program
This program shows how to emulate a double-click event in a Directory List Box control with the ENTER key.
 1.Create a new project in Visual Basic. Form1 is created by default.
 2.Add the following Constant and Declare statements to the General Declarations section of Form1 (note that each statement must be typed as a single line of code):
Private Declare Function GetFocus Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
   (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer,
   ByVal lParam As Long) As Long
Const WM_LBUTTONDBLCLK = &H203
 

3.Add the following code to the Form_Load event for Form1:

Private Sub Form_Load()
    Text1.Text = ""
    Text1.Text = CurDir$
End Sub
 

4. Add a Text Box control to Form1. Text1 is created by default.
5. Add a Directory List Box control to Form1. Dir1 is created by default.
6. Add the following code to the Dir1_KeyPress event for Dir1:

Private Sub Dir1_KeyPress(KeyAscii As Integer)
    Dim R As Long
    Dim DirHwnd As Integer
    Dim X As String
    If KeyAscii = 13 Then
        Dir1.SetFocus
        DirHwnd = GetFocus()
        R = SendMessage(DirHwnd, WM_LBUTTONDBLCLK, 0, 0)
        KeyAscii = 0
    End If
    X = Dir1.Path
    ChDir X
    Text1.Text = CurDir$
End Sub
 

Run the example program by pressing F5. The Directory List Box control displays a list of directories found on your hard drive. The name of the default directory appears in the Text Box control.

Select a directory from the Directory List Box control by pressing the first letter of the directory name or by clicking the directory name. Press ENTER. The currently selected directory is now the default directory.

Viewing 15 posts - 76 through 90 (of 110 total)
en_USEnglish