How can you hide an item in a ListView or at least set its height to zero?
I have tried setting the visibility of the View to GONE but it still maintains the item's space (height).
Hello,
I need to create a textbox which accepts 3 chars and must follow the following format
1st char - only numbers
2nd char - only upper case letters
3rd char - numbers and upper case letters (except zero)
This is what I have so far, but it's not working
<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
Mask="9L9" TargetControlID="txtNUIPC3" PromptCharacter="">
</ajaxToolkit:MaskedEditExtender>
I'm looking for a way to remove lines within multiple csv files, in bash using sed, awk or anything appropriate where the file ends in 0.
So there are multiple csv files, their format is:
EXAMPLEfoo,60,6
EXAMPLEbar,30,10
EXAMPLElong,60,0
EXAMPLEcon,120,6
EXAMPLEdev,60,0
EXAMPLErandom,30,6
So the file will be amended to:
EXAMPLEfoo,60,6
EXAMPLEbar,30,10
EXAMPLEcon,120,6
EXAMPLErandom,30,6
A problem which I can see arising is distinguishing between double digits that end in zero and 0 itself.
So any ideas?
Hi,
I doing multi users website (it should works for more than 100,000 users) with Zend Framework.
I need to create event calendar like google calendar (If it was possible to use google calendar i will do it- please tell me).
I have to do that from zero or exist some good Calendar that will work well with Zend?
Thanks
The OpenAL API states that an setting an offset still causes the sound to loop back to zero for looping sources. But is there a way to loop and still have an offset somehow?
I have an mp3, and since it contains headers with information at the start of the file, there's a small, but noticable, delay in looping when it rewinds.
If not, are there any other compressed formats that don't contain these empty headers?
Hi,
In my app i have have a Cursor field and in the onStart() method of my Android Service I create it by fetching records from my database. When i look into my cursor in the onStart() method i find a number of records but when i try to use them in my trigger() method it has zero records.
the field
private Cursor c;
in onStart()
c = dbHelper.fetchAllRecords();
in trigger()
c.getCount() returns null
I didn't close the cursor earlier than in my onDestroy() method
Hi, I'm stuck on the extended exercise 28.2 of How to Design Programs.
Here is the link to the question: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-35.html#node_chap_28
I used a vector of true or false values to represent the board instead of using a list.
This is what I've got which doesn't work:
#lang Scheme
(define-struct posn (i j))
;takes in a position in i, j form and a board and returns a natural number that represents the position in index form
;example for board xxx
; xxx
; xxx
;(0, 1) - 1
;(2, 1) - 7
(define (board-ref a-posn a-board)
(+ (* (sqrt (vector-length a-board)) (posn-i a-posn))
(posn-j a-posn)))
;reverse of the above function
;1 - (0, 1)
;7 - (2, 1)
(define (get-posn n a-board)
(local ((define board-length (sqrt (vector-length a-board))))
(make-posn (floor (/ n board-length))
(remainder n board-length))))
;determines if posn1 threatens posn2
;true if they are on the same row/column/diagonal
(define (threatened? posn1 posn2)
(cond
((= (posn-i posn1) (posn-i posn2)) #t)
((= (posn-j posn1) (posn-j posn2)) #t)
((= (abs (- (posn-i posn1)
(posn-i posn2)))
(abs (- (posn-j posn1)
(posn-j posn2)))) #t)
(else #f)))
;returns a list of positions that are not threatened or occupied by queens
;basically any position with the value true
(define (get-available-posn a-board)
(local ((define (get-ava index)
(cond
((= index (vector-length a-board)) '())
((vector-ref a-board index)
(cons index (get-ava (add1 index))))
(else (get-ava (add1 index))))))
(get-ava 0)))
;consume a position in the form of a natural number and a board
;returns a board after placing a queen on the position of the board
(define (place n a-board)
(local ((define (foo x)
(cond
((not (board-ref (get-posn x a-board) a-board)) #f)
((threatened? (get-posn x a-board) (get-posn n a-board)) #f)
(else #t))))
(build-vector (vector-length a-board) foo)))
;consume a list of positions in the form of natural number and consumes a board
;returns a list of boards after placing queens on each of the positions on the board
(define (place/list alop a-board)
(cond
((empty? alop) '())
(else (cons (place (first alop) a-board)
(place/list (rest alop) a-board)))))
;returns a possible board after placing n queens on a-board
;returns false if impossible
(define (placement n a-board)
(cond
((zero? n) a-board)
(else (local ((define available-posn (get-available-posn a-board)))
(cond
((empty? available-posn) #f)
(else (or (placement (sub1 n) (place (first available-posn) a-board))
(placement/list (sub1 n) (place/list (rest available-posn) a-board)))))))))
;returns a possible board after placing n queens on a list of boards
;returns false if all the boards are not valid
(define (placement/list n boards)
(cond
((empty? boards) #f)
((zero? n) (first boards))
((not (boolean? (placement n (first boards)))) (first boards))
(else (placement/list n (rest boards)))))
module ActiveRecord
module Mixin
alias old_id id
def id
old_id.to_i
end
def hello
"hellooooooooooooo"
end
end
end
ActiveRecord::Base.send :include, ActiveRecord::Mixin
I make is because:
id column in oracle is number type,not number(10), @user.id return 123.0,not 123,so I would like to do it by extend ar.
But my way above does not work for me,it still show number with dot zero,123.0.
How to make id auto invove id.to_i???
Dear all,
I would like to write a xslt rule if it matches a certain chapter ID that it sets autolabel to zero on the section.
in pseudo code:
IF CHAPTER == LOGBOOK
SECTION.AUTOLABEL = 0
ELSE
SECTION.AUTOLABEL = 1
ENDIF
But after reading the docbook xsl website and docbook xsl reference i'm still unable to figure out how to do it.
Maybe someone can push me in the right direction, because i'm new in docbook and xls(t)
Kind regards,
Jerry
I'm having some trouble with a Qt application; specifically with the QNetworkAccessManager class. I'm attempting to perform a simple HTTP upload of a binary file using the post() method of the QNetworkAccessManager. The documentation states that I can give a pointer to a QIODevice to post(), and that the class will transmit the data found in the QIODevice. This suggests to me that I ought to be able to give post() a pointer to a QFile. For example:
QFile compressedFile("temp");
compressedFile.open(QIODevice::ReadOnly);
netManager.post(QNetworkRequest(QUrl("http://mywebsite.com/upload") ), &compressedFile);
What seems to happen on the Windows system where I'm developing this is that my Qt application pushes the data from the QFile, but then doesn't complete the request; it seems to be sitting there waiting for more data to show up from the file. The post request isn't "closed" until I manually kill the application, at which point the whole file shows up at my server end.
From some debugging and research, I think this is happening because the read() operation of QFile doesn't return -1 when you reach the end of the file. I think that QNetworkAccessManager is trying to read from the QIODevice until it gets a -1 from read(), at which point it assumes there is no more data and closes the request. If it keeps getting a return code of zero from read(), QNetworkAccessManager assumes that there might be more data coming, and so it keeps waiting for that hypothetical data.
I've confirmed with some test code that the read() operation of QFile just returns zero after you've read to the end of the file. This seems to be incompatible with the way that the post() method of QNetworkAccessManager expects a QIODevice to behave. My questions are:
Is this some sort of limitation with the way that QFile works under Windows?
Is there some other way I should be using either QFile or QNetworkAccessManager to push a file via post()?
Is this not going to work at all, and will I have to find some other way to upload my file?
Any suggestions or hints would be appreciated.
Thanks,
Don
I am trying to build in SSH port forwarding into a .net application that I am writing.
I have tried using sharpSSH, but it requires the user to input their password every time, and I don't want that. I am going to handle storing the password.
I have downloaded Granados, but there is basically zero documentation for it. While I sift through the Granados source, does anyone know how to accomplish port forwarding with Granados or any other free SSH library for .NET?
I'm using c++ in visual studio express to generate random expression trees for use in a genetic
algorithm type of program.
Because they are random, the trees often generate: divide by zero, overflow, underflow as well as
returning "inf" and other strings. I can write handlers for the strings, but the literature left me
baffled about the others. If I understand it correctly, I have to set some flags first? Advice
and/or a pointer to some literature would be appreciated.
What does O, if indeed it is a Oh (As in the letter O) not the number Zero (0) mean?
I think the n would be number, but I'm not sure as I'm not a 'real' computer programmer, just a hobbyist. And log would be logarithmic function, but I only know that because of smarter people then I have told me this, while never really explaining what a logarithm is.
So please, in plain English, explain what this is, and the differences between the two (such as their applications.
I've come across a bug today that's taken far longer than I would like to admit to identify.
Essentially: setting a filter: blur(0) (or the vendor-specific -webkit-filter) on an element should - I believe - mean that no form of blur is applied.
However, having tested this today, it would appear that Webkit based browsers still blur the text within any element with either blur(0) or blur(0px) assigned to it.
I've knocked together a quick Fiddle here: http://jsfiddle.net/f9rBE/
These are three identical dixs containing text (no custom fonts):
This has absolutely nothing assigned
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam facilisis orci in quam venenatis, in tempus ipsum sagittis. Suspendisse potenti. Donec ullamcorper lacus vel odio accumsan, vel aliquam libero tempor. Praesent nec libero venenatis, ultrices arcu non, luctus quam. Morbi scelerisque sit amet turpis sit amet tincidunt. Praesent semper erat non purus pretium consequat. Aenean et iaculis turpis. Curabitur diam tellus, consectetur non massa et, commodo venenatis metus.
One has no styles at all assigned, the other two have blur(0) and blur(0px):
.no-blur{}
.zero-px-blur{
-webkit-filter: blur(0px);
-moz-filter: blur(0px);
-o-filter: blur(0px);
-ms-filter: blur(0px);
filter: blur(0px);
}
.zero-blur{
-webkit-filter: blur(0);
-moz-filter: blur(0);
-o-filter: blur(0);
-ms-filter: blur(0);
filter: blur(0);
}
If you preview this under Chrome/Safari you'll see that the text in the second two are still blurred:
A few things worth noting:
This unintentional blurring occurs in Safari on iOS7 devices (both iPhones and iPads);
It also occurs on Chrome and Safari under OSX;
It doesn't happen under FireFox in OSX.
Of course, this isn't supported at all in Firefox just yet so it's hard to tell whether the behaviour I'm seeing is intentional/expected behaviour, or whether this is a bug in Webkit?
Is it possible that this is only prevalent in higher-density resolution devices (ie: retina MacBook/iPhone/iPad)?
With this in mind, how do you actually overwrite an item that has blur applied to it to set it back to non-blurred?
i need to change the backcolor or background image of a mdi parent in my application. i tried changing the backcolor or specifying a background image, it won't work. i also tried looping the controls in the form to get the mdiclient and change its backcolor, also zero same result. I'm using telerik RadForm.
Please help
jepe
Hi,
I have a query:
declare @Code nvarchar(100)
select @Code="BMW"
select name from NewCars where code=@Code
if @@rowcount = 0
Select name from OldCars where code=@Code
In Sql managment studio first part give me 0 resuklts, and second 1 one result, and that is ok, but
in sqldatareader I use the same query ofcource without:
declare @Code nvarchar(100)
select @Code="BMW"
because I use:
cmd.Parameters.AddWithValue("@Code", "BMW");
And
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader.HasRows)
{
while (reader.Read())
{
Name= reader["Name"].ToString();
}
}
else
{
throw new NotSupportedException("Lack of car with this Code");
}
}
gives me zero result
How would you use regex to write a function that replaces all lowercase letters with uppercase and vice versa?
Note: this is NOT a homework question. See also my previous explorations of regex:
Regex split into overlapping strings (Alan Moore's answer is especially instructive)
Can you use zero-width matching regex in String split? (my solution exploits a known Java regex bug with regards to non-obvious length lookbehind!)
Hi all.
I was once looking for getting the HDD serial number without using WMI, and I found it. The code I found and posted on StackOverFlow.com works very well on 32 bit Windows, both XP and Vista. The trouble only begins when I try to get the serail number on 64 bit OSs (Vista Ultimate 64, specifically). The code returns String.Empty, or a Space all the time.
Anyone got an idea how to fix this?
EDIT:
I used the tools Dave Cluderay suggested, with interesting results:
Here is the output from DiskId32, on Windows XP SP2 32-bit:
To get all details use "diskid32 /d"
Trying to read the drive IDs using physical access with admin rights
Drive 0 - Primary Controller - - Master drive
Drive Model Number________________: [MAXTOR STM3160215AS]
Drive Serial Number_______________: [ 6RA26XK3]
Drive Controller Revision Number__: [3.AAD]
Controller Buffer Size on Drive___: 2097152 bytes
Drive Type________________________: Fixed
Drive Size________________________: 160041885696 bytes
Trying to read the drive IDs using the SCSI back door
Drive 4 - Tertiary Controller - - Master drive
Drive Model Number________________: [MAXTOR STM3160215AS]
Drive Serial Number_______________: [ 6RA26XK3]
Drive Controller Revision Number__: [3.AAD]
Controller Buffer Size on Drive___: 2097152 bytes
Drive Type________________________: Fixed
Drive Size________________________: 160041885696 bytes
Trying to read the drive IDs using physical access with zero rights
**** STORAGE_DEVICE_DESCRIPTOR for drive 0 ****
Vendor Id = []
Product Id = [MAXTOR STM3160215AS]
Product Revision = [3.AAD]
Serial Number = []
**** DISK_GEOMETRY_EX for drive 0 ****
Disk is fixed
DiskSize = 160041885696
Trying to read the drive IDs using Smart
Drive 0 - Primary Controller - - Master drive
Drive Model Number________________: [MAXTOR STM3160215AS]
Drive Serial Number_______________: [ 6RA26XK3]
Drive Controller Revision Number__: [3.AAD]
Controller Buffer Size on Drive___: 2097152 bytes
Drive Type________________________: Fixed
Drive Size________________________: 160041885696 bytes
Hard Drive Serial Number__________: 6RA26XK3
Hard Drive Model Number___________: MAXTOR STM3160215AS
And DiskId32 run on Windows Vista Ultimate 64-bit:
To get all details use "diskid32 /d"
Trying to read the drive IDs using physical access with admin rights
Trying to read the drive IDs using the SCSI back door
Trying to read the drive IDs using physical access with zero rights
**** STORAGE_DEVICE_DESCRIPTOR for drive 0 ****
Vendor Id = [MAXTOR S]
Product Id = [TM3160215AS]
Product Revision = [3.AA]
Serial Number = []
**** DISK_GEOMETRY_EX for drive 0 ****
Disk is fixed
DiskSize = 160041885696
Trying to read the drive IDs using Smart
Hard Drive Serial Number__________:
Hard Drive Model Number___________:
Notice how much lesser the information is on Vista, and how the Serial Number is not returned. Also the other tool, EnumDisk, refers to my hard disks on Vista as "SCSI" as opposed to "ATA" on Windows XP.
Any ideas?
EDIT 2:
I'm posting the results from EnumDisks:
On Windows XP SP2 32-bit:
Properties for Device 1
Device ID: IDE\DiskMAXTOR_STM3160215AS_____________________3.AAD___
Adapter Properties
------------------
Bus Type : ATA
Max. Tr. Length: 0x20000
Max. Phy. Pages: 0xffffffff
Alignment Mask : 0x1
Device Properties
-----------------
Device Type : Direct Access Device (0x0)
Removable Media : No
Product ID : MAXTOR STM3160215AS
Product Revision: 3.AAD
Inquiry Data from Pass Through
------------------------------
Device Type: Direct Access Device (0x0)
Vendor ID : MAXTOR S
Product ID : TM3160215AS
Product Rev: 3.AA
Vendor Str :
*** End of Device List
Hello:
I wish to render a scene that contains one box and a point light source using the Phong illumination scheme. The following are the relevant code snippets for my calculation:
R3Rgb Phong(R3Scene *scene, R3Ray *ray, R3Intersection *intersection)
{
R3Rgb radiance;
if(intersection->hit == 0)
{
radiance = scene->background;
return radiance;
}
...
// obtain ambient term
... // this is zero for my test
// obtain emissive term
... // this is also zero for my test
// for each light in the scene, obtain calculate the diffuse and specular terms
R3Rgb intensity_diffuse(0,0,0,1);
R3Rgb intensity_specular(0,0,0,1);
for(unsigned int i = 0; i < scene->lights.size(); i++)
{
R3Light *light = scene->Light(i);
R3Rgb light_color = LightIntensity(scene->Light(i), intersection->position);
R3Vector light_vector = -LightDirection(scene->Light(i), intersection->position);
// check if the light is "behind" the surface normal
if(normal.Dot(light_vector)<=0)
continue;
// calculate diffuse reflection
if(!Kd.IsBlack())
intensity_diffuse += Kd*normal.Dot(light_vector)*light_color;
if(Ks.IsBlack())
continue;
// calculate specular reflection
... // this I believe to be irrelevant for the particular test I'm doing
}
radiance = intensity_diffuse;
return radiance;
}
R3Rgb LightIntensity(R3Light *light, R3Point position)
{
R3Rgb light_intensity;
double distance;
double denominator;
if(light->type != R3_DIRECTIONAL_LIGHT)
{
distance = (position-light->position).Length();
denominator = light->constant_attenuation +
(light->linear_attenuation*distance) +
(light->quadratic_attenuation*distance*distance);
}
switch(light->type)
{
...
case R3_POINT_LIGHT:
light_intensity = light->color/denominator;
break;
...
}
return light_intensity;
}
R3Vector LightDirection(R3Light *light, R3Point position)
{
R3Vector light_direction;
switch(light->type)
{
...
case R3_POINT_LIGHT:
light_direction = position - light->position;
break;
...
}
light_direction.Normalize();
return light_direction;
}
I believe that the error must be somewhere in either LightDirection(...) or LightIntensity(...) functions because when I run my code using a directional light source, I obtain the desired rendered image (thus this leads me to believe that the Phong illumination equation is correct). Also, in Phong(...), when I computed the intensity_diffuse and while debugging, I divided light_color by 10, I was obtaining a resulting image that looked more like what I need. Am I calculating the light_color correctly?
Thanks.
I am making my own NSMenu programatically and popping it up when a button is pressed. I create NsMenuItems and add them with the NSMenu method insertItem:atIndex:. For some reason whatever item is at position zero in the menu does not show up. Is this how the menu is supposed to work?
The goal is to issue the fewest queries to SQL Server using LINQ to SQL without using anonymous types. The return type for the method will need to be IList<Child1>. The relationships are as follows:
Parent
Child1 Child2
Grandchild1
Parent Child1 is a one-to-many relationship
Child1 Grandchild1 is a one-to-n relationship (where n is zero to infinity)
Parent Child2 is a one-to-n relationship (where n is zero to infinity)
I am able to eager load the Parent, Child1 and Grandchild1 data resulting in one query to SQL Server.
This query with load options eager loads all of the data, except the sibling data (Child2):
DataLoadOptions loadOptions = new DataLoadOptions();
loadOptions.LoadWith<Child1>(o => o.GrandChild1List);
loadOptions.LoadWith<Child1>(o => o.Parent);
dataContext.LoadOptions = loadOptions;
IQueryable<Child1> children = from child in dataContext.Child1
select child;
I need to load the sibling data as well. One approach I have tried is splitting the query into two LINQ to SQL queries and merging the result sets together (not pretty), however upon accessing the sibling data it is lazy loaded anyway.
Adding the sibling load option will issue a query to SQL Server for each Grandchild1 and Child2 record (which is exactly what I am trying to avoid):
DataLoadOptions loadOptions = new DataLoadOptions();
loadOptions.LoadWith<Child1>(o => o.GrandChild1List);
loadOptions.LoadWith<Child1>(o => o.Parent);
loadOptions.LoadWith<Parent>(o => o.Child2List);
dataContext.LoadOptions = loadOptions;
IQueryable<Child1> children = from child in dataContext.Child1
select child;
exec sp_executesql N'SELECT * FROM [dbo].[Child2] AS [t0]
WHERE [t0].[ForeignKeyToParent] = @p0',N'@p0 int',@p0=1
exec sp_executesql N'SELECT * FROM [dbo].[Child2] AS [t0]
WHERE [t0].[ForeignKeyToParent] = @p0',N'@p0 int',@p0=2
exec sp_executesql N'SELECT * FROM [dbo].[Child2] AS [t0]
WHERE [t0].[ForeignKeyToParent] = @p0',N'@p0 int',@p0=3
exec sp_executesql N'SELECT * FROM [dbo].[Child2] AS [t0]
WHERE [t0].[ForeignKeyToParent] = @p0',N'@p0 int',@p0=4
I've also written LINQ to SQL queries to join in all of the data in hopes that it would eager load the data, however when the LINQ to SQL EntitySet of Child2 or Grandchild1 are accessed it lazy loads the data.
The reason for returning the IList<Child1> is to hydrate business objects.
My thoughts are I am either:
Approaching this problem the wrong way.
Have the option of calling a stored procedure?
My organization should not be using LINQ to SQL as an ORM?
Any help is greatly appreciated.
Thank you,
-Scott
I've tried Key.Subtract but I think that is the numpad version. I'm looking for the one after the zero key.
I wish to handle it in a KeyDown event.
Thanks
<html>
<head>
<title>Connecting </title>
</head>
<body>
<?php
$host = "*.*.*.*";
$username = "xxx";
$password = "xxx";
$db_name = "xxx";
$db = mssql_connect($host, $username,$password)
or die("Couldnt Connect");
$selected = mssql_select_db($db_name, $db)
or die("Couldnt open database");
?>
</body>
</html>
My error message is:
Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\php\dbase.php on line 12
I am using WampServer 2.0 on Php 5.3.0
When I check the extensions, php_mssql is Checked. I also checked the php.ini file to make sure it is not commented out.
I have my file dbase.php saved in C:\wamp\www\php. I have tried stopping the service, closing everything, and running it again. I know the problem is that the extension file is not being included somehow.
The below is copied from my php.ini file. Note I made all http = /http to avoid posting Links.
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths
and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2" ;include_path
= ".:/php/includes" ; Windows: "\path1;\path2" include_path =
"C:\wamp\bin\php\php5.3.0\ext" ; ;
PHP's default setting for include_path
is ".;/path/to/php/pear" ;
/http://php.net/include-path
; The root of the PHP pages, used only
if nonempty. ; if PHP was not compiled
with FORCE_REDIRECT, you SHOULD set
doc_root ; if you are running php as a
CGI under any web server (other than
IIS) ; see documentation for security
issues. The alternate is to use the ;
cgi.force_redirect configuration below
; /http://php.net/doc-root doc_root =
; The directory under which PHP opens
the script using /~username used only
; if nonempty. ;
/http://php.net/user-dir user_dir =
; Directory in which the loadable
extensions (modules) reside. ;
/http://php.net/extension-dir ;
extension_dir = "./" ; On windows: ;
extension_dir = "ext" extension_dir =
"c:/wamp/bin/php/php5.3.0/ext/"
; Whether or not to enable the dl()
function. The dl() function does NOT
work ; properly in multithreaded
servers, such as IIS or Zeus, and is
automatically ; disabled on them. ;
/http://php.net/enable-dl enable_dl =
Off
; cgi.force_redirect is necessary to
provide security running PHP as a CGI
under ; most web servers. Left
undefined, PHP turns this on by
default. You can ; turn it off here
AT YOUR OWN RISK ; You CAN safely
turn this off for IIS, in fact, you
MUST. ;
/http://php.net/cgi.force-redirect
;cgi.force_redirect = 1
; if cgi.nph is enabled it will force
cgi to always sent Status: 200 with ;
every request. PHP's default behavior
is to disable this feature. ;cgi.nph =
1
; if cgi.force_redirect is turned on,
and you are not running under Apache
or Netscape ; (iPlanet) web servers,
you MAY need to set an environment
variable name that PHP ; will look for
to know it is OK to continue
execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU
ARE DOING FIRST. ;
/http://php.net/cgi.redirect-status-env
;cgi.redirect_status_env = ;
; cgi.fix_pathinfo provides real
PATH_INFO/PATH_TRANSLATED support for
CGI. PHP's ; previous behaviour was
to set PATH_TRANSLATED to
SCRIPT_FILENAME, and to not grok ;
what PATH_INFO is. For more
information on PATH_INFO, see the cgi
specs. Setting ; this to 1 will cause
PHP CGI to fix its paths to conform to
the spec. A setting ; of zero causes
PHP to behave as before. Default is
1. You should fix your scripts ; to use SCRIPT_FILENAME rather than
PATH_TRANSLATED. ;
/http://php.net/cgi.fix-pathinfo
;cgi.fix_pathinfo=1
; FastCGI under IIS (on WINNT based
OS) supports the ability to
impersonate ; security tokens of the
calling client. This allows IIS to
define the ; security context that the
request runs under. mod_fastcgi under
Apache ; does not currently support
this feature (03/17/2002) ; Set to 1
if running under IIS. Default is
zero. ;
/http://php.net/fastcgi.impersonate
;fastcgi.impersonate = 1;
; Disable logging through FastCGI
connection. PHP's default behavior is
to enable ; this feature.
;fastcgi.logging = 0
; cgi.rfc2616_headers configuration
option tells PHP what type of headers
to ; use when sending HTTP response
code. If it's set 0 PHP sends Status:
header that ; is supported by Apache.
When this option is set to 1 PHP will
send ; RFC2616 compliant header. ;
Default is zero. ;
/http://php.net/cgi.rfc2616-headers
;cgi.rfc2616_headers = 0
;;;;;;;;;;;;;;;; ; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
; /http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP
uploaded files (will use system
default if not ; specified). ;
/http://php.net/upload-tmp-dir
upload_tmp_dir = "c:/wamp/tmp"
; Maximum allowed size for uploaded
files. ;
/http://php.net/upload-max-filesize
upload_max_filesize = 2M
Also, my php.ini file is saved in: C:\wamp\bin\apache\Apache2.2.11\bin
Perl script that would scrape out sentences that mention 'Calvein Klein' in articles in a file named by $file. (Sentences can cross zero or more CR/LF characters.) Create an array of sentences scraped and print it at the end.
Please anyone help me with that.
I generated a lower triangular matrix, and I want to complete the matrix using the values in the lower triangular matrix to form a square matrix, symmetrical around the diagonal zeros.
lower_triangle = numpy.array([
[0,0,0,0],
[1,0,0,0],
[2,3,0,0],
[4,5,6,0]])
I want to generate the following complete matrix, maintaining the zero diagonal:
complete_matrix = numpy.array([
[0, 1, 2, 4],
[1, 0, 3, 5],
[2, 3, 0, 6],
[4, 5, 6, 0]])
Thanks.