id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_38500 | #include <stdio.h>
int main()
{
FILE *f_structure;
int n, i, j, k;
k=3;
struct
{
char province[30], citya [30], cityb [30], cityc [30];
} list;
f_structure = fopen("city List.dat", "wb");
printf("Please input the amount of province: ");
scanf("%d", &n); getc... | |
doc_38501 | http://developer.linkedin.com/documents/tags-and-templates#share
The above link doesn't specify how to pass the LinkedIn id of the user.
A: The consensus appears to be: There is no way to setup a URL on LinkedIn to share to a particular individual.
If a user wants, they can select to send their message to everyone or ... | |
doc_38502 | I used mongodb profiler by setting up system.profiling level to 2 , did all my application operations , exported all the records from system.profile and finally set the indexes on the collections based upon the profiler result .
Now when i did explain on those queries
Query 1.
db.stocks.find({ symbol: "GOOG", date:... | |
doc_38503 | import jaydebeapi as jdbc
import pandas.io.sql as psql
import pandas
import getpass
import yaml
p = yaml.load(file("/Users/glassjawed/.TD"))
# Contains password
c = jdbc.connect('com.teradata.jdbc.TeraDriver'
,['jdbc:teradata://******.***.***.com','glassjawed',p]
,['~/terajdbc4.jar','~/tdgssconfig.jar'])
# read in the... | |
doc_38504 | <description><![CDATA[<img src="<?php echo $img; ?>">test test test test testtest test test test]]></description>
but on my website it's some kind different like this:
echo '
<item>
<title>'.$article[title].'</title>
<description><![CDATA[<img src="$img_path">
'.$shortdesc.'
... | |
doc_38505 | this is how the xml look in android studio:
and this is how the xml look actually in my phone, after i install the apk file:
i export an debug apk file, not release.
when i try to install the release apk file, i get error in my phone that Installation Certificate not found.
this is my xml code:
<?xml version="1.0" en... | |
doc_38506 | Can you guys explain to me how i can do so ?
A: Have you tried the codedge/laravel-fpdf package?
Install it through Composer:
composer require codedge/laravel-fpdf
Publish the config file and edit it as needed:
php artisan vendor:publish --provider="Codedge\Fpdf\FpdfServiceProvider" --tag=config
Add package's se... | |
doc_38507 | ls -al | grep alpha | more
A: A Little example with the first two commands. You need to create a pipe with the pipe() function that will go between ls and grep and other pipe between grep and more. What dup2 does is copy a file descriptor into another. Pipe works by connecting the input in fd[0] to the output of fd[1... | |
doc_38508 | <Page
x:Class="TouchTypeRacing.Views.NewsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TouchTypeRacing.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/marku... | |
doc_38509 | As the user picks a point on whichever image, I'm pushing that Point2f a vector dedicated to that particular image.
So in one instance I have the following data:
1. Image 2 at x: 607, and y: 286
2. Image 2 at x: 750, and y: 367
3. Image 2 at x: 527, and y: 353
4. Image 2 at x: 752, and y: 469
5. Image 2 at x: 584, and ... | |
doc_38510 | col1, col2, col3
bread, butter,?
coke, bread, butter
I am using WEKA for this purpose. The ouput is in the following format:
...
Large Itemsets L(2):
col1=bread col2= butter 1
col1=coke col2= bread 1
col1=coke col3= butter 1
col2= bread col3= butter 1
...
But the output that I am want is :
bread, butter 2
Basica... | |
doc_38511 | I have tried with putting:
defaultZone: http://192.168.207.24:9002/eureka/,http://192.168.207.24:9003/eureka/
but in this case eureka client is getting registered with second one not on both.
| |
doc_38512 | What I do to be able to see the current size of the tablespace is the next:
SELECT df.tablespace_name "Tablespace",
df.bytes / (1024 * 1024) "Size (MB)",
SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% U... | |
doc_38513 |
A: =MATCH(1,(LastName_Value=LastName_SearchRange)*(FirstName_Value=FirstName_SearchRange)*(Address_Value=Address_SearchRange),0)
It looks for a Match of 1 in the given conditions row by row. If a condition = TRUE it returns 1, if FALSE 2.
If one of the conditions is FALSE it will result in 0 (*0=0). If all 3 condition... | |
doc_38514 | Is there a way to use AWS Amplify and AppSync with it?
AWS Amplify says it works with iOS, Android, and web. I see java and javascript supported, but no C#.
Is there a way to use .NET Maui with AWS Amplify?
| |
doc_38515 | WaitForTenSeconds();
//Meanwhile do something in other threads and maybe set eventHappened to true
if (!eventHappened)
{
FailDueToTimeout();
}
WaitForTenSeconds can be implemented using simple Thread.Sleep
, await Task.Delay, ManualResetEvent.WaitOne or other similar methods
Now imagine I want to debug another part ... | |
doc_38516 | Python:
import httplib
body="<xml>...</xml>"
headers = { \
"Accept" : "text/*" , \
"User-Agent" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" , \
"Host" : "something.com" , \
"Content-Length" : str( len( body ) ) , \
"Connection" : "Keep-Alive" , \
"Cache-Control" : "no-cache" , \
}
server="something.com"
ur... | |
doc_38517 | -- ShinyApps
|
|_ base_app
|_ my_sub_app
And in base_app I have the following code:
# app.R
#-----------
# Server Section
#-----------
server <- function(input, output) { }
#-----------
# UI section
#-----------
ui <- fixedPage(
h1("My head"),
br(),
br(),
fluidRow(
column(6,
... | |
doc_38518 | How can I do this?
A: I'm a Javascript/svg/d3js noob, but I "solved" this by placing a hyperlinked transparent rectangle over the text, this workaround is available as a bl.ock.:
nodeEnter
.append("a")
.attr("xlink:href", function (d) { return "http://www.example.com/flare/" + d.id; })
.append("rect")
.... | |
doc_38519 | class DateValidate {
@IsDate()
date: Date;
}
@Get('day/:day')
getDayMealsPlan(@Param('day') day: DateValidate): any {
return day;
}
I'm passing the date param in the URL like so:
localhost:3000/meals/day/2022-03-06T11:00:00.000Z
It's throwing me a 400 error:
{
"statusCode": 400,
"message": [
... | |
doc_38520 |
A: I know this out of date, but you would need to do something called a HLR lookup via a sms gateway, InfoBip for example.
A: In the UK, you cannot do this. Numbers can be ported from operator to operator, it's all very fluid. Each operator will know how to route these numbers between themselves, but they don't expos... | |
doc_38521 | const QString m_DRIVER = "QSQLITE";
QSqlDatabase m_db;
m_db = QSqlDatabase::addDatabase(m_DRIVER, "mkddb");
m_db.setDatabaseName(":memory:");
My question is how I can access it in QML?
A: As long as You have the database connection established in some class of Yours, eg. Database Handler, You can expose it to QML in... | |
doc_38522 | For example, I want to find out which tables contain the field household_no.
How can I achieve this?
A: One method is to use the sys objects:
SELECT s.[name] AS SchemaName,
t.[name] AS TableName
FROM sys.schemas s
JOIN sys.tables t ON s.schema_id = t.schema_id
JOIN sys.columns c ON t.object_id = c.obj... | |
doc_38523 | char* messages[] = {
"t",
"123",
"test3",
"test4",
"test5",
"test1000"
};
I want to make a pointer to the array, I make it like so:
char *(*p)[6] = &messages;
I was wondering why is it that
p[0][3];
returns "test4" when
messages[3];
returns "test4"
also
p[1][3];
returns a seg fault.
I... | |
doc_38524 | How can a application or executing JVM understanding to deliver the user event or call the specific methods on a class that implemented the keylistener interface. Does it look at all the classes if those methods are implemented or how does it know which classes implmented keylistener interface ?
If you dont implement t... | |
doc_38525 | The javascript that performs the file uploading is as follows:
function makeFileList() {
var input =
document.getElementById("filesToUpload");
var ul =
document.getElementById("fileList");
while (ul.hasChildNodes()) {
ul.removeChild(ul.firstChild);
}
for (var i = 0; i < input.files.length; i... | |
doc_38526 | Eg. Picture/a.jpg, Picture/b.jpg, Pictuer/c.jpg, .....
Now, I want to directly show those multiple images from Cloud Storage into my cakephp 2.x web application as a list.
According to Google Cloud Storage documentation, to access each object inside bucket, Signed URLs must be generated.
So, I created signed URLs for e... | |
doc_38527 | img=Bitmap.createBitmap(width,height,Config.RGB_565);
img.setPixels(Y, 0, mWidth, 0, 0, mWidth, mHeight);
No matter how I fill int[]Y ,it seems to provide the Bitmap with ARGB_8888 value
(e.g .Y[i]=0xffffff00 presents yellow int ARGB_8888 ,but when i set the config to be RGB_565 ,it presents yellow too... Is there... | |
doc_38528 | The error they get is (and I have now reproduced it - I changed site name to preserve privacy):
warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpwmxeOQ' to 'sites/domain.org/files/Leading_Indicators_5.pdf' in /home/isp/domain-domains/domain.org/includes/file.inc on line 629.
F... | |
doc_38529 | I have 6 cookie values:
*
*vfimloggedin.
*vflastactivity.
*vflastvisit.
*vfpassword.
*vfsessionhash
*vfuserid.
When I use code below:
string postData = "&vb_login_username="
+ user
+ "&vb_login_password="
+ password
+ "&cookieuser=checked"
+ "&do=l... | |
doc_38530 | mv: missing destination file operand after `/tmp/asset-manager-service-1.0.2-SNAPSHOT.war'
Try `mv --help' for more information.
bash: line 1: /srv/asset-manager-service/war/: Is a directory
I thought that maybe this may be a problem with the fact I have a variable just before the second mv directory? The same error a... | |
doc_38531 | Example:
df<-data.frame(UID = 1:8,
A = c("blue", NA, "blue", NA, "green", NA, "green", "green"),
B = c("blue", "blue", NA, "blue", NA, "green", NA, "green"))
I am looking for the third column to equal;
df$C<-c(rep("blue", 4), rep("green", 4))
I have tried using tidyr::unite to no avail.... | |
doc_38532 | The original file looks like:
TAG ANIMAL
A CAT
B CAT
C CAT
D DOG
A DOG
The result files should look like this (post split):
File 1
TAG ANIMAL
A CAT
A DOG
File 2
TAG ANIMAL
B CAT
File 3
TAG ANIMAL
C CAT
File 4
TAG ANIMAL
D DOG
Attempts:
I tried split -p A filename prefix, but this only works... | |
doc_38533 | e
s
u
o
H
In this exercise, we should use recursion and if-else statements. No arrays, no other (familiar) String method, no while and for loop.
I have done a little bit, I know it is not correct, but that is how much I managed to do. ... | |
doc_38534 | Instance created.
DIM-00019: create service error
O/S-Error: (OS 1053) The service did not respond to the start or control request in a timely fashion.
| |
doc_38535 |
A: Random rnd = new Random();
var sequence = Enumerable.Range(1, 2).Select(n => lst[rnd.Next(0, lst.Count)]).ToList();
A: For Linq-to-Objects and EF4 it's pretty simple
db.Users.OrderBy(r => Guid.NewGuid()).Take(2)
For Linq-to-SQL You can check this article
http://michaelmerrell.com/2010/03/randomize-result-orders... | |
doc_38536 | <!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/half-slider.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<!-- JQuery -->
<script src="js/jque... | |
doc_38537 | The code is working as intended, but there is one issue. When shrinking the userform, the userform leaves a trail of all size increments set during the loop. This makes the program look less "smooth". I've included a screenshot of the issue as well as the relevant code.
I've tried including variations of DoEvents and ... | |
doc_38538 | [POST]>. Error 400 Bad Request: Failed to decode JSON object: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte while decompression. \",). in loads\n s = s.decode(encoding)\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte\n\nDuring handling of the above... | |
doc_38539 | The tutorial specifically states:
We recommend using an AVD that is based on Android 11 or higher.
It is working fine with API 29 (Android 10) but it does not work with API 30 (Android 10+) and produces the following error:
2020-08-11 11:22:34.979 8607-8698/com.codelabs.camerax E/CameraCaptureSession: Session 0: Excep... | |
doc_38540 | All good but when I use the jquery.fancybox.js the template menu links wont work anymore, I click them and nothing happens, transitions not happening anymore.
I suspect there's something that has to do with both using hrefs (the template is a one page site using hrefs and so does the .js to call the pics?)
Sorry for m... | |
doc_38541 | var httpWebRequest = WebRequest.Create(context.Url) as HttpWebRequest;
httpWebRequest.Method = "POST"
... (set all the stuff)
... (get request stream and post data)
//Get response
var httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse;
... (Inspect Headers)
//Get response stream and read body
... | |
doc_38542 | This is code snippet I am testing
<input type="file" name="uploadedfile" accept="image/*" capture="camera" />
<input type="file" name="uploadedfile2" accept="image/*" capture />
<input id="myFileInput" type="file" accept="image/*;capture=camera">
All three cases are working when testing as web application in phone brow... | |
doc_38543 |
A: You want scipy.ndimage.zoom, which can be used as follows:
>>> x = np.arange(8, dtype=np.float_).reshape(2, 2, 2)
>>> scipy.ndimage.zoom(x, 1.5, order=1)
array([[[ 0. , 0.5, 1. ],
[ 1. , 1.5, 2. ],
[ 2. , 2.5, 3. ]],
[[ 2. , 2.5, 3. ],
[ 3. , 3.5, 4. ],
[ 4. , 4.5,... | |
doc_38544 | SELECT `sold_by` , COUNT(`booth_number` ) , `Date` FROM `registration`
WHERE `Date` BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND CURDATE()
GROUP BY `sold_by` ";
//$result="SELECT count(`booth_number`),`sold_by`
FROM `registration` GROUP BY `sold_by` ";
A: Is this what you are looking for?
SELECT... | |
doc_38545 | If I run this as 'main' (i.e. from the command line for example), with doctest disabled, it runs just fine, and the prints at the end of the file give exactly what they should.
20120
20220
203820
But when I call the doctest at the beginning, then it seems to mess up the variables, and the results are not correct anymo... | |
doc_38546 | services.AddAuthorization(options =>
{
options.AddPolicy("AboveUser",
policy => policy.RequireRole("Admin", "Manager"));
options.AddPolicy("IsAdmin",
policy => policy.RequireRole("Admin"));
options.AddPolicy("IsManager",
policy ... | |
doc_38547 | private void button4_Click(object sender, EventArgs e)
{
//if (comboBox2.)
{
comboBox2.Items.Add(comboBox2.Text);
}
}
Then I tried to use Settings, and using System.Text.Json;
ComboBox2Items (Type:string, Scope:User)
private void SaveUserData()
{
var json = JsonSerializer.Serialize(comboBox2.I... | |
doc_38548 | When I'm pulling the data I'd like to add a new sequence/counter that increments only when certain conditions are met within the other fields.
Ideally something like this:
DECLARE @counter int = 0;
SELECT Item, Date, Event,
@counter = @counter +
(CASE
WHEN Event = 'Something' THEN 1
ELSE 0
... | |
doc_38549 | start transaction;
insert into feed_full_text (feed_id, full_text) values (5000008, "lorem ipsum");
select feed_id, full_text
from feed_full_text
where feed_id = 5000008 and match(full_text) against("lorem" in boolean mode)
order by feed_id desc
limit 1;
commit
Returns no results, however:
start transaction;
inser... | |
doc_38550 | I know you can do this with awk or sed but I can't seem to figure out how.
This is how the output looks:
insert_job: aaa-bbb-ess-qqqqqqq-aaaaaa-aaaaaa job_type: c
box_name: sss-eee-ess-saturday
command: $${qqqq-eee-eat-cmd} $${qqqq-eee-nas-cntrl-dir}\eee\CMS\CMS_C3.xml $${qqqq-eee-nas-log}\eee\AFG\AFG_Build_Qwer.log ... | |
doc_38551 | For example:
request (domain1.com) -> [incoming gateway] --tunnel--> [https server1.intern]
request (domain2.com) -> [incoming gateway] --tunnel--> [https server2.intern]
Usually I'm doing this with apache mod proxy, but when using client certificate we must tunnel the ssl connection directly to the server behind the i... | |
doc_38552 | public void Stream GetResponse()
{
WebResponse response = webRequest.GetResponse();
responseStream = response.GetResponseStream();
return responseStream;
}
But it returns
500 - Internal server
error, so I am trying to GetResponse in using
public void Stream GetResponse()
{
using(WebResponse respo... | |
doc_38553 | My table name is MGOFile, and the column is File. This is a simple select statement on the first few rows, the left column is the raw data, the right is what I need the resultant rows to look like...
I query my table using this:
'''sql
SELECT
File,
'T:\'|| substr(File, 8,2000) as File
FROM
... | |
doc_38554 |
def copytest():
lst = []
for i in range(1000000):
lst.append(i)
starttime = timeit.default_timer()
copiedlst = lst.copy()
endtime = timeit.default_timer()
elapsedtime = endtime - starttime
elapsedtime += elapsedtime
return elapsedtime
for j in range(1, 100):
print(j, copytest())
I am trying to see how long... | |
doc_38555 | In the keyboardwillshow notification, i tried to add toolbar to the keyboard but no luck, i cant add
Please let me know
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
UIView* keyboard;
for(int i = 0; i < [tempWindow.subviews count]; i++)
{
//Get a reference of... | |
doc_38556 | I've been wondering if there is a way to save the history the callbacks are tracking for situations like these.
I did try to save my full model as it includes the callbacks, figured that would suffice, but since my model is not an instance of Sequential, I have to save the weights only.
| |
doc_38557 | A simplified example:
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.js">
</script>
</head>
<body>
<section ng-app="myApp" ng-controller = "TestController">
<button ng-click = "pushToList()">Add number to list.</button>
... | |
doc_38558 | The old.com site were in a IIS host, so I have transfered it to a server with apache, where I could use htaccess to redirect the old urls to the new ones. I have done it with php from the database in order to not to have writing every instruction by hand.
Examples dynamic old urls ==> new urls:
old.com/mots.asp?nm=1 ==... | |
doc_38559 | I tried to run VBoxSDL.exe in command line, I got the error
: RTLdrOpenWithReader failed: Unknown Status -626 (0xfffffd8e) (Image='\SystemRoot\System32\ntdll.dll').
And when I try to run a virtual machine in command line,I got
Waiting for VM "xp" to power on...
VBoxManage.exe: error: The virtual machine 'xp' has ter... | |
doc_38560 | SELECT DISTINCT ?dataset ?title WHERE {
?dataset a dcat:Dataset ;
dcterms:title ?title ;
dcterms:description ?description .
{ ?dataset dcterms:title ?title .
?title bif:contains "'keyword_1'" }
UNION
{ ?dataset dcterms:description ?description .
?descri... | |
doc_38561 | Example :-
Mohit ----- मोहित
A: Your problem can be solved with a parser. Have a look at compiler making. The parser is an important part of it.
Anyhow you need a state machine which represents the rules for the transliteration. I don't know how complicated it will be to make one for Hindi->English or where you can f... | |
doc_38562 | However, when I create a feature file with my scenario and try to run my scenario in IntelliJ, the glue is not being automatically detected, even though I have a test runner correctly defined. If I happen to specify the glue manually, everything works as expected but I wanted it to automatically add the glue that is al... | |
doc_38563 | Specifically, I installed the following packages:
*
*Xamarin.FFImageLoading Version="2.4.11.982"
*Xamarin.FFImageLoading.Forms Version="2.4.11.982"
*Xamarin.FFImageLoading.Svg.Forms Version="2.4.11.982"
*Xamarin.FFImageLoading.Transformations Version="2.4.11.982"
I also initialized it as follows:
*
*Under Androi... | |
doc_38564 | Basically looks like this:
<questions>
<question>
<prompt>In which city is Fresno street?</prompt>
<type>city.of.residence</type>
<answer>HILLSIDE</answer>
<answer>ATLANTA</answer>
<answer>ALMO</answer>
<answer>None of the above</answer>
</question>
<question>
<prompt>In which state is Fresno st... | |
doc_38565 | Now however it appears that the Version editor from within Xcode (next to the Assistant editor button) isn't working. When I try to load up the "Time Machine" view (clock hands with CCW arrow), the status bar says "Loading Revision" and never loads my previous commits. My previous commits appear in the "Organizer - Rep... | |
doc_38566 | Each invoice has the following data
ID = a unique id for each ID
CUSTOMER = The name of the ID
AMT = The total value of the invoices
DATE = The date of the purchase
For the following data
CID CUSTOMER AMT DATE
1 James 100 1/1/2012
2 Mark 110 1/1/2012
3 John ... | |
doc_38567 | Context initContext=new InitialContext();
Context envContext=(Context)initContext.lookup("java:comp/env");
DataSource ds=(DataSource)envContext.lookup("jdbc/DB");
con=ds.getConnection();
And I have a context.xml file in my META-INF folder with these values:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resou... | |
doc_38568 | map1: = map[string] map[string] interface {} {}
map2: = map[string] interface {} {}
map2["firstObject"] = "value1"
map2["secondObject"] = "value2"
map1["jsonName"] = map2
b, err: = json.Marshal(map1)
if err != nil {
panic(err)
}
fmt.Println(string(b)) // outputs: {"jsonName":{"firstObject":"value1","secondObject"... | |
doc_38569 | Will checkpoints work? How do I store them and retrieve them after some time? Can you please mention code for that. It would be great.
A: Google Colab instances are created when you open the notebook and are deleted later on so you can't access data on different runs. If you want to download the trained model to your ... | |
doc_38570 | var App = function(endPoint, successCallback) {
var channel = new WebSocket(endPoint);
channel.onopen = function(ev) {
successCallback();
};
};
I'm thinking of something like this:
describe('App', function() {
it('test should create instance and call success', function(done) {
var app =... | |
doc_38571 | There is a relation R. It is decomposed into two relation R1 and R2.
if R = (R1 JOIN R2) then it is losless join decomposition.It is alright.
if R is a subset of (R1 JOIN R2) then lossy join decomposition.
Here is lossy join decomposition, after join R1 and R2 we are actually getting more records compare to R. So wha... | |
doc_38572 | Full disclosure, I am pretty new to Python.
What I am trying to achieve is;
*
*Perform a HTTP POST to download a PDF (with Requests, Python 3).
*I want to take the stream and give it Google Drive, which will convert back to a PDF and save the file in the Drive folder.
I am ok with the url file request, but I am r... | |
doc_38573 |
A: As stated in this post, you'll have to tweak the Visual Studio Git settings and tick the "Enable download of author images from 3rd party source" checkbox.
If your Git repo remote origin is in a third-party Git service (such GitHub, Bitbucket, or CodePlex), select Enable download of author images from 3rd party so... | |
doc_38574 | The hash built as follows:
127.0.0.1:6379> hset person:1 name John age 30
(integer) 2
127.0.0.1:6379> hset person:2 name Peter age 45
(integer) 2
127.0.0.1:6379> hset person:3 name James age 40
The code to read the hash is as follows -
SparkSession spark = SparkSession
.builder()
.appName("MyApp... | |
doc_38575 | If there is a gap with not containing the child item, it is not skipping the correct item
<ul class="product-categories">
<li class="cat-item cat-parent"><i class="icon fa fa-plus"></i><a href="#">Parent 1</a>
<ul class="children">
<li class="cat-item"><a href="#/">Child</a></li>
<li... | |
doc_38576 | Apple's Code
CGSize cellSize = ((UICollectionViewFlowLayout *)self.collectionViewLayout).itemSize;
My Code
let cellSize: CGSize = UICollectionViewFlowLayout.collectionViewContentSize(self.collectionViewLayout)
And I get an error saying (UICollectionViewLayout) -> 'is not convertible to 'UICollectionViewFlowLayout -... | |
doc_38577 | Note that each site instance has its own set of static resources (img, css, js), and should be referenced from the corresponding web directory on the server, and there may be some overlap in the names of some of the resources (eg. style.css) and folders (eg. /img/..).
Any pointers of help would be very much appreciated... | |
doc_38578 | "An error has occurred
This product is subject to strict US export control laws. Prior to providing access, we must validate whether you are eligible to receive it under an available US export authorization.Your request is being reviewed.Upon completion of this review, you will be contacted if we are able to give acces... | |
doc_38579 | I'm testing an application's security, it uses Invoke method, but accepts the Object type, method and parameters dynamically from user's input. I believe it is dangerous and I'm trying to prove it.
Do you think I can invoke Console.Write or execute some sort of arbitrary/dangerous code?
I want to try to use C# Invoke M... | |
doc_38580 | function startLine()
{
select("line_b");
var color = getColor(false);
var line = new GPolyline([], color);
startDrawing(line, "Distance " , function()
{
var cell = this;
var len = line.getLength();
cell.innerHTML = (Math.round(len / 10) / 100).toFixed(2) + " km";
cell.... | |
doc_38581 | I cannot use the library as the movieclip I am duplicating is dynamically generated by actionscript (a graph based on user input over time) and thus cannot be made by me beforehand as it varies.
I need to somehow make a duplicate of this on a layer above the where the original was made, anyone know how this is possible... | |
doc_38582 | root@DESKTOP-H8CB6JO:/mnt/c/Users/ddgun# gcloud compute instances list
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
docker-2 us-east1-b e2-medium true 10.142.0.13 TERMINATED
docker-install us-east1-b e2-medium true 10.142.0.11 ... | |
doc_38583 | When deploying a lambda from Cloud9, does it always deploy on $LATEST ?
When importing a lambda in Cloud9, does it always import $LATEST ?
Can we choose versions ?
Can we choose alias ?
If this is somewhere is the doc, sorry, I just can't find it.
A: The Lambda section of the AWS Resources window in the AWS Cloud9 ID... | |
doc_38584 |
A: adfsserver.us.mycompanyname.com/adfs/ls is in the Internet zone and the automatic login will not happen.
adfsserver/adfs/ls is in your Intranet zone in IE and will log in automatically.
You could add adfsserver.us.mycompanyname.com to your trusted (or Intranet zone) sites list and you should be not be prompted for... | |
doc_38585 | https://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=iwGFalTRHDA&format=json
Here is the json:
{
"title": "Trololo",
"width": 459,
"height": 344,
"thumbnail_height": 360,
"html": "\u003ciframe width=\"459\" height=\"344\" src=\"https:\/\/www.youtube.com\/embed\/iwGFalTRHDA?feature=oembed\" frame... | |
doc_38586 | My code is
x = [1,2,3,4];
y = [1,2,3,4,5];
z = [1,2,3,4,5,6];
for xi = 1:4
for yi = 1:5
for zi = 1:6
a(xi,yi,zi) = x(xi) * x(xi);
endfor
endfor
endfor
[xx yy zz] = meshgrid(x,y,z);
scatter3(xx(:), yy(:), zz(:), [], a(:),'fill');
xlabel('x')
ylabel('y')
zlabel('z')
colormap(rainbow)... | |
doc_38587 | I tried to use this regex:
([A-Z][a-zA-Z\-\']*\s*)*(\s+\([^)]*\)[\s]*)+$
to match this input:
can This Be PosSible (Ignore aNy Upper CAse in parenthesis)
and the match is:
This Be PosSible (Ignore aNy Upper CAse in parenthesis)
but the desired output is:
PosSible (Ignore aNy Upper CAse in parenthesis)
See this on r... | |
doc_38588 | Is it possible to create an android app which can cast device screen including "negative colors" accessibility feature instead of true colors? Or is it technically impossible?
A: By "Negative Colors", are you referring to "Color Inversion" or is it something else? Apps don't have control over mirroring/cast screening;... | |
doc_38589 | After loads of debugging I found that it always stops between buffer offset 0xFFF0 and 0x10008 Which happens to be where uint16's end. I have no idea why this would be the case but that is the only thing I can think of.
My buffer is made up of structs defined as:
struct Vertex {
float2 position [[ attribute(0) ]];
... | |
doc_38590 | threads = []
(0..10).each do |_|
threads << Thread.new do
# do async staff there
sleep Random.rand(10)
end
end
Then there is 2 ways to wait when it's done:
*
*Using join:
threads.each(&:join)
*Using ThreadsWait:
ThreadsWait.all_waits(threads)
Is there any difference between these two ways of doing t... | |
doc_38591 | This works :
document.getElementById("circ").style.backgroundColor = getRandomColor();
But this doesn't work :
document.getElementById("circ").style.background-color = getRandomColor();
A: - is the subtraction operator. It can't appear in an identifier, which a dot notation property is.
You can use the background-co... | |
doc_38592 | <layer>
<item>
</item>
</layer>
And my JavaScript is like this.
angular.module('app', []);
var app = angular.module('app');
app.directive('layer', [
function () {
return {
replace:true,
transclude:true,
template: "<div></div>",
link:function(){
... | |
doc_38593 | I'm trying to override the 404 page.
The current 404 page is located here:
modules\cms\views\404.php
... and is served by:
modules\cms\classes\Controller.php
As you can see, both the controller and the view are inside modules. This folder is a dependency folder and its content should not be altered. The best approach I... | |
doc_38594 | lotto = {
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0
}
test_list = [1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 5]
for i in test_list:
if test_list[i] == 1:
lotto['1'] += 1
if test_list[i] == 2:
lotto['2'] += 1
if test_list[i] == 3:
lotto['3'] += 1
if test_list[i] == 4:
... | |
doc_38595 |
} else {
liveInfo
.fadeOut(2000)
.html('در حال پخش : ' + current)
.fadeIn(1500)
.delay(7000);
if (next != ''){
liveInfo
.fadeOut(2000)
.html('بعدی : ' + next)
.fadeIn(1500)
.delay(5000)
}
}
two part of my code run asynchronously and I can't see first... | |
doc_38596 | class read:
def __init__(self,p,t,r):
self.p = p
self.t = t
self.r = r
def dis(self):
print('Principle amount:',self.p)
print('No.Of.Years:',self.t)
print('Rate of interest:',self.r)
class cal(read):
def calu(self):
print('Simple Interest:'(self.p*self.t*self.r)/100)
a = ... | |
doc_38597 | I have two files. product.php and index.php. Product.php defines the product class, and I'm just using index.php as a page to output the variables. Ideally, this would be used to output objects from different classes in the future.
product.php
class Product{
public $var = "a default value";
public function __c... | |
doc_38598 | So, in catalog/view/theme/*/template/common/header.tpl I want to do something like:
if( $is_thank_you_page ){
echo "stuff";
// bonus: I wanted to get the order email but maybe it should be a different post
}
But how can I check in the header.tpl if it is the "success"/"thank you" page?
I tried setting a variable... | |
doc_38599 | I'm trying to call a abstract class and get this error Cannot create an instance of the abstract class or interface and I already research this error but I'm really confused on this.
Here's my code:
string B1String;
while ((B1String = OasisFile.ReadLine()) != null)
{
Questions_Base oQu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.