Installing boost 1.52 with VS2012
I followed these instructions to install boost and to compile all libraries:
https://www.quantnet.com/threads/tutorial-quantlib-boost-installation-in-visual-studio-2012.11891/
Boost Installation The Boost library can be downloaded here. Currently,
the latest version available is Boost 1.52.0. You can build boost by
following the instruction here.
Alternative you can download a pre-built lib from here. Once downloaded,
copy the installer into the Boost 1.52.0 folder and run it. Rename the
folder to lib once done.
So I downloaded boost 1.52, then copied that to C:\Program Files (x86)\boost\
I then downloaded the 1.52 64 bit installer and once downloaded, pasted
that to:
C:\Program Files (x86)\boost\boost_1_52_0\boost_1_52_0\
I executed the installer- it said "extracting" and then many library names.
I then renamed the last folder to lib, so that I had:
C:\Program Files (x86)\boost\boost_1_52_0\lib\
In my VS2012 I then added the previous directory to my project. The
project then starting parsing through the libraries and I had no linker
errors. However, when building the project I still got:
LINK: fatal error LNK1104: cannot open file
'libboost_date_time-iw-mt-gd-1_52.lib'
(The only usage of boost in my project is file_mapping and mapped_region)
Help?
Friday, 13 September 2013
Check if string starts with http or www or /
Check if string starts with http or www or /
This works:
if (strpos($page, 'http') == 0) {
$link = 'Test';
}
But this doesn't:
if (strpos($page, 'http' || 'www' || '/') == 0) {
$link = 'Test';
}
I need to return something if $page does not begin with any of those
three: http, www, or /.
This works:
if (strpos($page, 'http') == 0) {
$link = 'Test';
}
But this doesn't:
if (strpos($page, 'http' || 'www' || '/') == 0) {
$link = 'Test';
}
I need to return something if $page does not begin with any of those
three: http, www, or /.
Images issue portmapping server 2012 -> server 2008
Images issue portmapping server 2012 -> server 2008
I have the following issue:
My images are half broken when I try to load them from external.
Setup Windows server 2012 with Hyper-V On Hyper-v I have a Windows 2008
server with IIS.
I have a port mapping port 80 (on Windows 2012 server) to my Windows
server 2008 IIS.
When I try to reach IIS from the windows server 2012 to the Windows server
2008 by local IP there is no problem.
When I try to reach IIS from outside the network I got a broken IIS image.
http://s9.postimg.org/e8wvs3din/Screen_Shot125.jpg
I already tried to disable firewall on both servers. (same problem) I
tried to setup xampp in stead of IIS on 2008 server (same problem)
I have the following issue:
My images are half broken when I try to load them from external.
Setup Windows server 2012 with Hyper-V On Hyper-v I have a Windows 2008
server with IIS.
I have a port mapping port 80 (on Windows 2012 server) to my Windows
server 2008 IIS.
When I try to reach IIS from the windows server 2012 to the Windows server
2008 by local IP there is no problem.
When I try to reach IIS from outside the network I got a broken IIS image.
http://s9.postimg.org/e8wvs3din/Screen_Shot125.jpg
I already tried to disable firewall on both servers. (same problem) I
tried to setup xampp in stead of IIS on 2008 server (same problem)
Thursday, 12 September 2013
How can I tag a property in iOS and track it's state throughout the app?
How can I tag a property in iOS and track it's state throughout the app?
Is there a way to tag a property or Instance variable throughout the life
of the application and see it changes?
The idea would be to see how the property is changed and what class/object
changes it's value when that value is passed around a lot? This way we
could see its value every time it changes instead of filling the code with
breakpoints.
Is there a way to tag a property or Instance variable throughout the life
of the application and see it changes?
The idea would be to see how the property is changed and what class/object
changes it's value when that value is passed around a lot? This way we
could see its value every time it changes instead of filling the code with
breakpoints.
Default Arguments vs. Overloading wrt. Name Lookup?
Default Arguments vs. Overloading wrt. Name Lookup?
In C++, given the alternatives:
void fun(int arg1, int arg2opt = 0);
// vs.
void fun(int arg1, int arg2);
void fun(int arg1) {
fun(arg1, 0);
}
Are there any differences for user code wanting to use this function, that
is, given any code base, which code constructs would break (at compile
time or runtime) when I were to change the first definition into the
second? (Overload resolution? Name lookup? Assigning fun to a function
pointer? Usage in templates? ...)
Or will these be the same semantically? (here are some details that I know
and that are not relevant for this question)
In C++, given the alternatives:
void fun(int arg1, int arg2opt = 0);
// vs.
void fun(int arg1, int arg2);
void fun(int arg1) {
fun(arg1, 0);
}
Are there any differences for user code wanting to use this function, that
is, given any code base, which code constructs would break (at compile
time or runtime) when I were to change the first definition into the
second? (Overload resolution? Name lookup? Assigning fun to a function
pointer? Usage in templates? ...)
Or will these be the same semantically? (here are some details that I know
and that are not relevant for this question)
How to make a Java File Reader
How to make a Java File Reader
I'm trying to make a word scrambler for a project in class. It needs to
read in a .txt file and output a String with all of the words in the file;
but scrambled. for example:
Tihs is how the wrdos sulohd be sarcmbeld.
Ignoring punctuation and leaving the first and last letter in place.
I'm having trouble reading in the file into an array. I was planning on
using collections.shuffle to shuffle the inner layers by ignoring the
first and last letter and randomizing the inner letters.
I dont know how to impliment the file reader, but here is my scrambler for
each word.
public static String shuffle(String input){
input = "supercalifragilisticexpialidocious";
int i = 0;
ArrayList<Character> chars = new
ArrayList<Character>(input.length());
String output = "";
char[] characters = input.toCharArray();
char[] newWord = new char[input.length()];
newWord[0] = characters[0];
newWord[input.length()-1] = characters[input.length()-1];
for (i=1; i < input.length()-1;i++ ) {
chars.add(characters[i]);
}
System.out.println(chars);
for (i = 1; i <= input.length()-2; i++)
{
Collections.shuffle(chars);
}
Character[] middle = chars.toArray(new Character[chars.size()]);
for (i = 1; i < newWord.length - 2; i++)
{
newWord[i] = middle[i];
}
System.out.println(newWord);
StringBuffer r= new StringBuffer(output);
for (i = 0; i < newWord.length-1; i++)
{
r.append(newWord[i]);
}
return output;
}
This outputs saxupieipclflaurrtocslcidigaiiois like i want, but now i need
a way to read the .txt file in and split it into separate words.
If anyone can help me that would be great. What I'm really looking for is
if someone can help me with making a file reader for this.
I'm trying to make a word scrambler for a project in class. It needs to
read in a .txt file and output a String with all of the words in the file;
but scrambled. for example:
Tihs is how the wrdos sulohd be sarcmbeld.
Ignoring punctuation and leaving the first and last letter in place.
I'm having trouble reading in the file into an array. I was planning on
using collections.shuffle to shuffle the inner layers by ignoring the
first and last letter and randomizing the inner letters.
I dont know how to impliment the file reader, but here is my scrambler for
each word.
public static String shuffle(String input){
input = "supercalifragilisticexpialidocious";
int i = 0;
ArrayList<Character> chars = new
ArrayList<Character>(input.length());
String output = "";
char[] characters = input.toCharArray();
char[] newWord = new char[input.length()];
newWord[0] = characters[0];
newWord[input.length()-1] = characters[input.length()-1];
for (i=1; i < input.length()-1;i++ ) {
chars.add(characters[i]);
}
System.out.println(chars);
for (i = 1; i <= input.length()-2; i++)
{
Collections.shuffle(chars);
}
Character[] middle = chars.toArray(new Character[chars.size()]);
for (i = 1; i < newWord.length - 2; i++)
{
newWord[i] = middle[i];
}
System.out.println(newWord);
StringBuffer r= new StringBuffer(output);
for (i = 0; i < newWord.length-1; i++)
{
r.append(newWord[i]);
}
return output;
}
This outputs saxupieipclflaurrtocslcidigaiiois like i want, but now i need
a way to read the .txt file in and split it into separate words.
If anyone can help me that would be great. What I'm really looking for is
if someone can help me with making a file reader for this.
Open specific Excel file in new instance of Excel when file is opened
Open specific Excel file in new instance of Excel when file is opened
Info:
I have an Excel file named Demo.xlsm
This file contains a userform named UserForm1 which automatically loads
when the file is opened.
The workbook named Demo.xlsm is also visible in the background behind the
userform when the file is opened.
Problem:
I often have an Excel application already open on my desktop with various
workbooks and worksheets containing information I use on a daily basis. As
it stands, if I go to open the Demo.xlsm file, it will open in the current
Excel application along with all of the other workbook/worksheets I am
using.
First: I would like for the Demo.xlsm file to automatically open in an
entirely separate instance/Excel application than my other works.
Second: I would like for only the userform to be visible. (I have no
need/use for the workbook/worksheets to be visible in the background.)
Third: If its possible to have the 2nd instance of the Excel application
to be minimized while still displaying the userform, that would be
perfect. (Currently, if I attempt to minimize the 2nd instance of the
Excel application, the userform is also minimized)
Private Sub Workbook_Open()
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
UserForm1.Show
End Sub
I feel that I am not going about this the right way...
Any help with this would be greatly appreciated!
Info:
I have an Excel file named Demo.xlsm
This file contains a userform named UserForm1 which automatically loads
when the file is opened.
The workbook named Demo.xlsm is also visible in the background behind the
userform when the file is opened.
Problem:
I often have an Excel application already open on my desktop with various
workbooks and worksheets containing information I use on a daily basis. As
it stands, if I go to open the Demo.xlsm file, it will open in the current
Excel application along with all of the other workbook/worksheets I am
using.
First: I would like for the Demo.xlsm file to automatically open in an
entirely separate instance/Excel application than my other works.
Second: I would like for only the userform to be visible. (I have no
need/use for the workbook/worksheets to be visible in the background.)
Third: If its possible to have the 2nd instance of the Excel application
to be minimized while still displaying the userform, that would be
perfect. (Currently, if I attempt to minimize the 2nd instance of the
Excel application, the userform is also minimized)
Private Sub Workbook_Open()
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
UserForm1.Show
End Sub
I feel that I am not going about this the right way...
Any help with this would be greatly appreciated!
Subscribe to:
Posts (Atom)