id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_13100 | Anyhow I'd tried to do a query of a SQL server table that was effectively
select top 5 * from MyTable WHERE [Timestamp]>'2021-11-09' ORDER BY [Timestamp] DESC
In order to get the 5 most recent entries (NB it has no identity column). Timestamp is a DATETIME field.
The table has 6 million+ records and this query was tak... | |
doc_13101 | Let's say that I have a "User" interface, with a method placeholder that returns a string. The method will be named getName().
I want to do
User user = (INSTANTIATE SOMEHOW);
System.out.println(user.getName());
This is achieved in Bukkit's implementation much the same way
Player player = Server.getPlayer("Jimmothy");
... | |
doc_13102 | aGbNHjryzDtZ1Rfu6MKPKyxcXor0r5uUc3Tj1v5fLxQ=,4NcpgPdO1XQ+uTfB2rsAdQ==
aGbNHjryzDtZ1Rfu6MKPK8TxszHHUsotNWSG9br52aA=,4NcpgPdO1XQ+uTfB2rsAdQ==
aGbNHjryzDtZ1Rfu6MKPK5hsadSqAmQkc9WJF6XQHX4=
So this: ,4NcpgPdO1XQ+uTfB2rsAdQ==
Maybe it's the line break, maybe the comma itself?
What am I doing wrong in my code?
def base64Enco... | |
doc_13103 |
*
*What exactly do Save Mode and Flush Mode control?
*What are the use cases where SaveMode and Flush Mode need to be set explicitly?
SaveMode
/**
* Supported modes of tracking and saving session changes to session store.
*
* @author Rob Winch
* @author Vedran Pavic
* @since 2.2.0
*/
public enum SaveMode {
... | |
doc_13104 | ID Text
1 <Key><Name>Adobe</Name><Display>Ado</Display></Key><Key>.....</Key>
2 <Key><Name></Name><Display>Microsoft</Display><Version>1.1</Version></Key>
There can be multiple keys for each ID.There could be several thousand rows in a table in above format. I've to generate the final sql output in below fo... | |
doc_13105 | QApplication a(argc, argv);
QDialog d;
d.exec();
MainWindow w;
w.show();
return a.exec();
While debugging when passing over d.exec(), above code will spit out
onecore\windows\directx\database\helperlibrary\lib\directxdatabasehelper.cpp(652)\d3d9.dll!00007FFFC322BF65: (caller: 00007FFF... | |
doc_13106 | async tempFunction(vartA:'abc'|'dfe'){
let x = vartA
}
How can i do something similar in Python? (to add specific types to variable within the function definition)
Of course tried the following, but it seems that it doesn't accept it:
def tempFunction(vartA:'abc' or 'dfe'):
pass
is there any override / al... | |
doc_13107 | I tested this example here, but the type "NativeArray" was not recognized: https://stackoverflow.com/a/1433489/975097
How can I get the NativeArray type to be recognized?
A: Rhino offers this:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Embedding_tutorial#usingJSObjs
Also Scriptable interface offer... | |
doc_13108 | central repo has following branches
*
*dev
*uat
*prod
It has a few more remote branches but for sake of brevity mention three.
claims repo only has master branch.
A week ago we now see the following branches on the claims repo
*
*master
*prod
Both repos are default name is origin. We are a small team and no on... | |
doc_13109 |
Runtime error: Uncaught Error: Module parse failed: The keyword 'interface' is reserved.
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
const nextConfig = {
distDir: "../../build",
async headers() {
return [
{
source: '*',
... | |
doc_13110 | This code makes it display a preview. But what would I write after it to make it stay for five seconds?
Thanks!!
@Override
public void onPictureTaken(byte[] data, Camera camera) {
camera.startPreview();
}
A: Create PreviewFragment which has ImageView on which you'd display the Bitmap created from the byte arra... | |
doc_13111 | This looks much better:
Comp.includes(:members).where('members.member_email = ? OR comps.user_id = ?', current_user.email,current_user.id)
UPDATE:
This seems to work but is there a more elegant way to do this in Rails? I feel like there must be.
@my_comps = Comp.joins('LEFT OUTER JOIN teams ON teams.comp_id = comp... | |
doc_13112 | mod1<-lmer(logpd~arm*lspline(pday,knots=2)+(1|pid),data=q1)
I would like to recreate the following plot with ggplot:
obsmeans<-aggregate(q1$logpd,by=data.frame(q1$pday,q1$arm),mean);obsmeans
fitted<-aggregate(fitted(mod1),by=data.frame(q1$pday,q1$arm),mean);fitted
plot(obsmeans$x~fitted$q1.pday)
lines(fitted$x[which... | |
doc_13113 | i want to use the data I am posting in the callback function. if u take a look,
$('#fb_user_msg').innerHTML = data.comment;
the above line is trying to include the comment in the html (unsuccessfully). i am sure this is easy but I dont know why I am not getting it right.
$("#submit_js").click(function() {
$.post(... | |
doc_13114 | print("hello world") (savelist.py)
And this is my html javascript file
<html>`<html>`
<head>
hjgkhkj
</head>`enter code here`
<body>
<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue">
<script>
$('#id').click(function(){
$.ajax({
type:'get',
... | |
doc_13115 | I do not understand how I can return these variables from the modal window to the main widget, I will be glad for any help
In modal i have two TextEdit controller for redact:
TextEditingController _comeInController = TextEditingController();
TextEditingController _goOutController = TextEditingController();
I wan retur... | |
doc_13116 | {
MailMessage message = new MailMessage();
message.From = new MailAddress("sheikh.abm@gmail.com");
message.To.Add(new MailAddress(model.To));
message.Subject = model.Subject;
message.Body = model.Message;
return View();
}
this is my controller action. And in ... | |
doc_13117 | I just want the program to either reject non numerical strings, or ignore letters when pressed on keyboard.
import java.util.Scanner;
public class practice7 {
public static void main(String[] args) {
System.out.println(" Wlecome to the Magellan School student assistant \n\n");
System.out.pri... | |
doc_13118 | I am new to react and am building a toy react game. I borrowed this timer I found here. If user performs an action and the parent component re-renders, the timer stop counting down for a short period of time. According to (https://reactjs.org/docs/hooks-effect.html), react will remember the useEffect function, and call... | |
doc_13119 | Here's what I have:
module Seq =
let isUniformBy (f) (xs : seq<_>) =
let l =
xs
|> Seq.map f
|> Seq.distinct
|> Seq.truncate 2
|> Seq.length
l < 2
let isUniform xs = isUniformBy id xs
printfn "%b" <| Seq.isUniformBy id [ 1; 2; 3 ] // false
printfn "%b" <| Seq.isUnifo... | |
doc_13120 | But when running in iOS 8, it can work fine. I don't know why. Can you help me to fix this issue?
A: I found this answer in the Apple developer forums (it works for me):
Add to:
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath
The following line after y... | |
doc_13121 | The code looks like this:
import numpy as np
site = np.genfromtxt('.....\Plot_1.txt', dtype=None, delimiter='\t')
c1 = np.array([148, 108])
c2 = np.array([181, 147])
c3 = np.array([173, 153])
c4 = np.array([98, 221])
c5 = np.array([43, 153])
trees_list = [c1, c2, c3, c4, c5]
def trees_pixel(rc_list, matrix):
... | |
doc_13122 | From the backbone documentation:
Note that using real URLs requires your web server to be able to
correctly render those pages, so back-end changes are required as
well. For example, if you have a route of /documents/100, your web
server must be able to serve that page, if the browser visits that URL
directly.... | |
doc_13123 | #include <iostream>
#include<conio.h>
using namespace std;
int main()
{
char str[100];
int a, e, i, o, u, whitespace;
a = e = i = o = u = whitespace = 0;
int k;
cout << "Enter a string: ";
cin >> str[99];
for (k = 0; k < strlen(str); k++)
{
if (str[k] == 'A')
{
... | |
doc_13124 | 4 low severity vulnerabilities
To address all issues, run:
npm audit fix
A: Try using this command:
$ npm set audit false
| |
doc_13125 | $sdate = $_POST['dtpicker'];
$dtpicker = DateTime::createFromFormat('d/m/Y', $sdate);
if ($dtpicker === false) {
echo
"<script LANGUAGE='JavaScript'>
window.alert('Date is Expire Please try again!');
window.location.href='https://www.home.ae/online-form/';
</script>";
}
$d = $dtpicker->format('Y-m... | |
doc_13126 |
A: You can mount a VMDK as a local disk with Disk Mount Utility.
A: You may want to take a look at ctypes-vddk if you are looking to import modules for exfiltration of vmdk data through python. You can find the module here; http://code.google.com/p/ctypes-vddk/
Personally, if you are looking to leverage the VDDK API... | |
doc_13127 | Sqrt[1 - x^2]
Currently I'm getting the right Riemann sum by getting the x axis, and y axis and then getting a table for the rectangles.
rectangles[x_, y_] :=
Table[Rectangle[{x[[i]], 0.}, {x[[i + 1]], y[[i]]}], {i,Length[x] - 1}]
I then show the plot
Show[{Plot[y, {x, -1, 1}],
Graphics[{Opacity[0.3], Pink, EdgeFo... | |
doc_13128 | FIRST_KEY = 'FIRST_KEY',
SECOND_KEY = 'SECOND_KEY',
}
export const DICT: {
[key in SomeKeys]: {
title: string;
greeter: () => {};
};
} = {
[SomeKeys.FIRST_KEY]: {
title: 'first key title',
greeter: (name: string) => ({ name }),
},
[SomeKeys.SECOND_KEY]: {
title: 'second key title',
... | |
doc_13129 | here's the error:
E:\.......\src\components\ButtonInstance.jsx:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React from 'react';
^^^^^^
SyntaxError: Cannot use impor... | |
doc_13130 | @interface Employee : NSObject
{
NSString *name;
NSString *nickname;
NSString *filename;
// Attributes
int personality;
int behaviour;
int attitude;
int workrate;
int morale;
int health;
}
I want to make all my RPG attributes listen to rules. ie: Personality can be 1-99, health... | |
doc_13131 | Since I need to have certain key/values of those objects grouped together in different arrays I created new arrays with just a couple of key/values from the original array.
Just an example array:
var data = [
{
"ID": 1,
"Completed": "yes",
"Prio": 3,
"Importance": 2
},
{
"ID": 2,
"Completed"... | |
doc_13132 | This query works nice if I don't apply any filters to it. The count's seem right, but as soon as I add something like this: where c.parent_id is not null and r.time_cook_minutes > 60 I am filtering out most of the categories instead of just getting a count of zero.
here's an example query that I came up with that does... | |
doc_13133 | I'm now trying to integrate it with an existing application for many reasons such as 3rd party plugins, automatic updates, not to mention that SOA just makes me happy.
I now have a decision I'm struggling to make, which is weather
*
*My entire application should become an OSGi bundle installed by default in the con... | |
doc_13134 | My index.ts:
import { IMyInterface, IMyInterface2 } from './common/types';
export class ExampleClass {
public async getInfo(): Promise<IMyInterface[]> {
return await request();
}
}
So when I use this library I do see the returned Type in VSCode, but I can not define variables using these types. For instance t... | |
doc_13135 | We randomly measured the resistance of 30 resistors and wrote down them.
X = [14.95, 14.94, 14.92, 14.98, 16.53, 14.96, 16.20, 14.32, 15.32, 14.25, 15.36, 14.95, 15.13, 14.26, 14.94, 15.6,
15.20, 14.94, 15.02, 15, 14.62, 14.94, 14.94, 14.98, 15.12, 15.06, 14.95, 14.96, 15.13, 15.20]
I want to get graph like th... | |
doc_13136 | hasBook(markham_library,dave,"Artifical Intelligence: A Modern Approach",1).
hasBook(indigo,levesque,"the two",2).
hasBook(union_library,dave,"the three",3).
hasBook(somewhere_library,bob,"Thinking as Computation",4).
hasBook(amazon,robert,"the five",5).
hasBook(ajax_library,daniel ,"the six",6).
hasBook(markham_librar... | |
doc_13137 | url = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins={}&destinations={}&key={}"
# Get method of requests module
# return response object
r = requests.get(url.format(origin, dest, api_key))
# json method of response object
# return json format result
x = r.json()
If BLVD is passed to... | |
doc_13138 |
in the EC_GUI constructor I initialize the glViewer
private void initGlViewer() {
/**
* Viewer.
*/
glViewer = new GLViewer();
glViewer.setup();
centerPanel.add(glViewer.getNewtCanvasAWT());
}
The glViewer implements the GLEventListener and is the following
... | |
doc_13139 | typedef CGAL::Exact_circular_kernel_2 CircK;
typedef CGAL::Point_2<CircK> Point_2;
typedef CGAL::Segment_2<CircK> Segment_2;
typedef CGAL::Circle_2<CircK> Circle_2;
I still can't seem to find the proper function to do the intersection however... CGAL's examples mostly involve Circle_2 and Line_2 or just two circles.
| |
doc_13140 |
I guess &arr in this array is of type char(*)[10].
If I am right, what is the type of *(&arr)? Is it of type base address or address to first element in array?
A: Given:
char arr[10];
as you say, &arr is of type char (*)[10]. Of itself, *(&arr) is of type char [10], but in most contexts (other than sizeof()) it wil... | |
doc_13141 | this.$el.draggable({
scroll: false,
axis: false,
opacity: 0.5,
helper: 'clone',
grid: [100, 100]
drag: function (e, ui) {
console.log('Dragging');
}
});
At now drag event fires on every mouse move but I need to trigger this event only when I drag... | |
doc_13142 | Either I can use sql task first for db query and web service task next for web service call. Another way is to do do entire thing in the c# code and put that in script task.
I can use enterprise library for doing db query through the C# code and then call the web service.
What is the better approach to do it ?Which one... | |
doc_13143 |
A: How can I draw vertical text with CSS cross-browser?
.rot-neg-90 {
/* rotate -90 deg, not sure if a negative number is supported so I used 270 */
-moz-transform: rotate(270deg);
-moz-transform-origin: 50% 50%;
-webkit-transform: rotate(270deg);
-webkit-transform-origin: 50% 50%;
-o-transform: rotate(270... | |
doc_13144 | obj = videoinput('winvideo' ,1,'YUY2_320x240');
to take real time video and i have to read the 1st frames of video to track the object region i used
videoFileReader = read(video,1);
method but it gives an error
Error: " Undefined function 'read' for input arguments of type 'videoinput' "
so i need any altern... | |
doc_13145 | user_table
id name
-- ----
1 abc
2 def
3 ghi
user_product_table
id user_id product
-- ------- --------
1 1 abcd
1 1 efgh
1 1 ijkl
1 2 mnop
1 2 qrst
1 3 uvwx
1 3 yxab
with joining user_table and user_product_table, i... | |
doc_13146 | This codepen is the simplified version of what I have.
https://codepen.io/yuukive/pen/BVqpEZ
With the code above, if I do
(Open dialog --> press SAVE button --> (validation fails) --> press CLOSE button --> open dialog again),
it is already validated when I open the dialog again...
Is it possible to reset validation b... | |
doc_13147 | I'm trying to write a parser in Python using PLY for a made up language. A simplified version of my BNF looks like this:
statement-list -> statement ',' statement-list |
'print' expr
statement -> ident 'was' 'a' type |
ident 'became' expr
type -> 'number' | 'letter'
expr -> factor |
... | |
doc_13148 | So that later any string which is related to this pattern could be cleaned by only allowed chars and then aligned with pattern.
For example samples could be:
"A111AA1" - means that all possible chars: only letters and didgits; pattern should be: first letter, then 3 digits, followed by 2 letters and 1 digit.
"11AA-111A... | |
doc_13149 | $0Public$robotics00$india0$000facebook
If we want to extract the words Public robotics india facebook from the above string, how can we?
I am using ([^0$]), but it is giving the letters not the proper words.
A: We can try a regex split here:
input = "$0Public$robotics00$india0$000facebook"
parts = input.split(/\d*\$\... | |
doc_13150 |
*
*What's the difference (since after testing I see no visible
difference)?
*What is the -u part called?
A: The -u flag, according to Python's --help statement:
force the binary I/O layers of stdout and stderr to be unbuffered; stdin is always buffered; text I/O layer will be line-buffered; also PYTHONUNBUFFERE... | |
doc_13151 |
A: Here is how to change the font size at runtime....
yourLabel.font=[UIFont systemFontOfSize:14];
A: Create UILabel
self.lbl=[[UILabel alloc] initWithFrame:CGRectMake(135, 290,200,35)];
self.lbl.backgroundColor=[UIColor clearColor];
NSString *str=[NSString stringWithFormat:@"%.f",[self.slider value]];
[... | |
doc_13152 | For Android when I'm using IBM application centre to install the app on my Android devices.
First App file size is 5MB and it is getting installed.
Second App file size is 9MB and it is not getting installed (Doesn't show the install overlay at all). The behaviour as the following:
*
*Click Install
*It shows loadin... | |
doc_13153 | import urllib
url = "https://www.cs.cmu.edu/~./enron/enron_mail_20150507.tgz"
urllib.urlretrieve(url, filename="../enron_mail_20150507.tgz")
print ("download complete!")
I tried urllib.request .
import urllib
url = "https://www.cs.cmu.edu/~./enron/enron_mail_20150507.tgz"
urllib.request(url, filename="../enron... | |
doc_13154 | I tried a HOC, but with TypeScript it will trigger an error if I use a different color than the original. Perhaps I made it wrong.
Here's my code:
import { Button, ButtonProps } from '@material-ui/core';
import React from 'react';
import { LuxButtonStyles } from './style';
type MaterialColor = 'primary' | 'secondary' ... | |
doc_13155 | For example, I want to match 'United Nations Headquarters'
and it can exist in the text in the following forms:
United Nations & Headquarters
United <br> Nations Headquarters
United Natio<b>ns Hea</b>dquarters
I basically need to know the positions of these strings, and I will deal with the spurious characters later.... | |
doc_13156 | [library1
function 1
blablablah1
[library2
...
function 2
blablablah2
I want to find the closest [library...] line, to guess which library contains my current cursor line:
For example, if I have the cursor in the line "blablablah2", and do a search (ctrl+f), and start typing "[lib", t... | |
doc_13157 | Does it make a difference if I set
my_article.author_id = author_one.id
or If I do
author_one << my_article
The associations that are used are
*
*Author has_many articles
*Articles belongs_to Author
And, by the way, what would be the best way to look it up if similar questions appear?
A: I'm assuming you me... | |
doc_13158 | {
"applicationDirectory":null,
"applicationStorageDirectory":null,
"dataDirectory":null,
"cacheDirectory":null,
"externalApplicationStorageDirectory":null,
"externalDataDirectory":null,
"externalCacheDirectory":null,
"externalRootDirectory":null,
"tempDirectory":null,
"syncedDataDirectory":null,
"documentsDirectory":n... | |
doc_13159 | I have a MS Access DB which I am using in Access 2016. It is from a client and being used to provide data for another system.
Anyway, I am trying to mock some database data being returned from the table without changing the database data. So, I figured I would just do a select of constants, as I would in SQL or any oth... | |
doc_13160 | Thanks!!
| |
doc_13161 | For example I have a list of elements and tapping on one I want it to disappear and the ones below him to 'get up' filling the missing space
How can I make the transition smooth?
A: React-natives own animated API works really well.
Basically you have a value in state, which you connect with a style props, and change ... | |
doc_13162 | I want to have a participant app send a change via:
gapi.hangout.data.submitDelta({'sState':locState});
Then have all other clients update their local state.
Thanks for any help!
A: Calling setValue will trigger gapi.hangout.data.onStateChanged and all participants using the app should be notified. Also, any participa... | |
doc_13163 | The closest I could get was using this: https://developer.android.com/reference/android/support/v17/leanback/widget/HorizontalGridView.html , and it has a big bug in which you can't set the number of rows with setNumRows(int) since it makes the horizontalgridview infinitly scrollable vertically.
I also considered the o... | |
doc_13164 | ||
doc_13165 | I tried:
RUN ls
RUN pwd
RUN echo "$PWD"
RUN echo "whatever"
and while the command runs, there is no output in the build log.
this is also the solution recommended in Is it possible to show the `WORKDIR` when building a docker image? but in 2021, on MacOS, it doesn't work.
how can I do this?
A practical example:
FROM m... | |
doc_13166 | The code looks like this:
DELIMITER $$
DROP PROCEDURE IF EXISTS order_procedure$$
CREATE PROCEDURE order_procedure()
BEGIN
DECLARE id INT;
DECLARE flag INT DEFAULT 0;
DECLARE ordercursor CURSOR FOR
SELECT id FROM wp_posts
WHERE wp_posts.post_type = 'shop_order';
DECLARE CONTINUE HANDLER FOR NOT FOUND SET flag = 1;... | |
doc_13167 | I am setting a keydown event handler, and then triggering the event. But the handler doesn't detect it.
If anyone can enlighten me!
function onKeyDown(event)
{
alert('keydown');
}
document.addEventListener('keydown', onKeyDown, false);
var keydown = jQuery.Event('keydown', {which:38, keyCode:38});
$(document).k... | |
doc_13168 | Will this API improve the performance of 2D rendering (Vector) in any way, or will the library be used primarily for rendering 3D?
Any information around how Stage3D will influence 2D Vector rendering performance would be awesome.
A: You can use Stage3D to render optimized 2D graphics but you'll have to do an ad hoc d... | |
doc_13169 | The method call to managedQuery doesn't include this param and there fore I see no way to implement this w/o somehow overriding the managedQuery method?
I've created a second query method in my content provider which accepts an additional param, the limit param but I don't think I can make the managedQuery method call ... | |
doc_13170 | $string = "Our products are shoes, pants, shirts."
$products = get_post_meta( post_id, 'products', true );
$matches = get_post_meta( post_id, 'matches', true );
$newPhrase = '';
foreach ($matches as $match){
$id = searchForId($match, $products); // searching for the right id
$newPhrase = str_replace($match, $... | |
doc_13171 |
The column starts with Status, followed by Title, I, II, III, IV, V, VI, VII, Date.
When switch to mobile new, it also follow the order to show as picture below.
I want to rearrange column Status and show it after VII column.
I tried by searching online and footable documentation, but seems no similar solution.
Appre... | |
doc_13172 | When users type just ../myfoldername/ or ../myfoldername, Can I direct them to ../myfoldername/default.aspx location? Is there a way to do this in vb.net? I saw this question /folder/ does not point to .aspx page but couldn't achieve what I wanted. Thank you for the help.
| |
doc_13173 | int main() {
std::vector<int> a{0, 7, 8, 9};
std::vector<int> b{1, 2, 3, 4};
std::cout << std::boolalpha;
std::cout << "a < b returns " << (a < b) << '\n';
}
But doing the same in reverse order fails to compile:
int main() {
std::vector<int> a{3, 2, 1};
std::vector<int> b{9, 8, 7, 6};
std... | |
doc_13174 | I have a class DrawView that extends View, it's like a simple paint app
public class DrawView extends View implements OnTouchListener {
Bitmap bitmap;
Canvas bitmapCanvas;
int color;
// Position of finger down
float pX, pY;
// Position of finger up
float mX, mY;
// Create new path
... | |
doc_13175 | The program is failing on the accept method on the first run of the loop. From what I read in the man pages, accept is supposed to block the caller until a connection is made, and not fail if there aren't connections in the queue like it is doing. Is there any reason accept would be returning a value less than 0? I wil... | |
doc_13176 | def uncompress(str)
new_str = ""
(0 ... str.length - 1).each do |i|
new_str += str[i] * str[i + 1].to_i
end
new_str
end
Result:
uncompress('a2b4c1') # 'aabbbbc'
Why this code does not return an error if str[i] is a number and str[i+ 1] is a letter?
A: As you're doing substitution in a string,... | |
doc_13177 | info = {'first_name': 'Artur', 'last_name': 'Sapek'}
me = User()
for i in info:
me[i] = info[i]
brings up TypeError: 'User' object is not subscriptable and I find myself writing code like
info = {'first_name': 'Artur', 'last_name': 'Sapek'}
if 'first_name' in info: me.first_name = info['first_name']
if 'last_nam... | |
doc_13178 | I have four environments for my application DEV, QA, STG, PROD. I want to have four different environment files and wish to read values depending upon the environment where application is running. Also wish to pass the name of the environment from the external source and accordingly set the config file for the environm... | |
doc_13179 | I believe I would have to run/use the ADT package program to create and package the custom air file.
and I think 'd have to get the running air application to run ADT from the command line to programmatically create the adobe air application.
Is this possible?
thank you,
Carlos
A: It's possible to call the AIR compile... | |
doc_13180 | Following is the code I am using:
public class MainActivity extends Activity {
protected static final int RESULT_SPEECH = 1;
protected static final String TAG = "MY_TAG";
private TextView spokenText;
private Button spkButton;
private Button stopButton;
private SpeechRecognizer sR;
private ... | |
doc_13181 | I have copied the error and the files below:
/src/PrestaShopBundle/Resources/config/services/core/currency.yml
src/Core/Currency/ExchangeRateProvider.php -> In this file is defined the constant CLOSED_ALLOWED_FAILURES
PS:
-Curiously if I restore a backup of days ago when the web was running, I get the same error!
*
*... | |
doc_13182 | library FTP_DLL;
uses
SysUtils,Classes,IdFTP,Dialogs;
{$R *.res}
var
IdFTP1: TIdFtp = nil;
begin
IdFTP1.Host := 'My ftp server';
IdFTP1.UserName := 'user';
IdFTP1.Password := 'password';
IdFTP1.Connect;
IdFTP1.Put('C:\test.txt','test.txt',False);
ShowMessage('ok') ;
end.
Thank you.
A: The most egregi... | |
doc_13183 | Here is the existing preg_match code:
preg_match("/(\/)([0-9]+)(\/?)$/", $_SERVER["REQUEST_URI"], $m);
which does a good job of detecting the post_id in the following URI string:
http://www.example.com/health-and-fitness-tips/999/
I believe that should be enough background.
I'm changing the 999, the post_id, to how-d... | |
doc_13184 |
"access denied for user anonymous".
Any tips?
A: Solved. I had to select 'http basic authentication' in Drupal services, add 'headers' to the alamofire query, plus my authentication header needed to e:
let user = "example"
let password = "example"
let credentialData = "\(user):\(password)".dataUsingEnco... | |
doc_13185 | http://django-rest-framework.org/api-guide/throttling.html
telling me nothing about their policy.
My needs with the API are simple: keep all their features, and apply cache when nothing has changed. When something changes in DB, have a mechanism to invalidate proper cache pages.
For example:
If I have list and detail v... | |
doc_13186 | The backend resides on the same server as the website in a sub-directory.
In this sub-directory I have a folder where the uploaded images are stored from a form in the backend. This all works 100%. The entire backend works like it's supposed to.
Here's the problem, as soon as I loop through the DB to view the images on... | |
doc_13187 | I have one activity in which it has 3 buttons and on one button click I am displaying the AlertDialog box and on second button click I am displaying the List Dialog Box and On 3rd button click I am toggle the OnScreen Key board in android.
my problem is that I was able to call the first button and when I click the 2nd ... | |
doc_13188 | @Transactional
public void setStopped(Machine machine)
{
machine.setStatus(StatusType.STOPPED);
machineRepository.saveAndFlush(machine);
}
@Transactional
public void setRunningAndAvailable(Machine machine)
{
machine.setStatus(StatusType.RUNNING);
machine.setAvailable(true);
machineRepository.saveAn... | |
doc_13189 |
A: For Mac Users
Go to Mac "System Preferences" and click on "Network"
Click on the gear icon on the lower left corner
select "Set Service Order"
Bring the active interface before other interfaces (Bring it down the queue)
Restart the Android Emulator.
| |
doc_13190 | Here are my files:
//Table.java ----- servlet
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
imp... | |
doc_13191 | I have a class called Network that contains everything for the above, here's part of it.
//part of my class
std::mutex mMessageMutex;
//message is class for messages to share
queue<message> mMessageQueue;
std::thread mTCPthread;
std::thread mUDPthread;
Network::threadTest(){
mTCPthread = std::thread(&Sender::... | |
doc_13192 | This is my code:
var group1 = new THREE.Group();
var obj = new THREE.Object3D();
var loader = new THREE.JSONLoader();
loader.load( 'obj.json', function ( geometry, materials ) {
var phongMaterials = materials.map( function ( material ) {
return new THREE.MeshPhongMaterial( {
co... | |
doc_13193 | While I'm not new to python, I've only ever hacked on existing packages.
I'm working on a package that will only be run from wherever its repository has been cloned. I can use pip install -e . during development and pip install . once it's working the way I want.
I'm using a virtual environment, so I don't pollute my n... | |
doc_13194 | What we want to achieve
In the first step we want to achieve inter Application Voice and Video Calls. Later on we might expand into outbound calls into the normal telephone network. But this post is mainly for getting info on how to implement only our first step.
general thoughts
We had some experiences with Asterisk b... | |
doc_13195 | The preferred parsing method would be using the Codable protocol as I want to make custom objects from my plist.
I have set up the following example:
// example plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist vers... | |
doc_13196 | The problem is, that my app is already built using a different container. (Pimple, believe me if it was an option to change it all I would)
So I need to build out my own helpers to use in the main part of the app. The API returns before proceeding into and booting the main app so having the Lumen helpers autoloaded in ... | |
doc_13197 | Take the following syntax:
match imp req with
| Success () -> this.Ok () :> _
Is this the same as:
| Success () -> this.Ok () :> IHttpActionResult
What is the advantage of writing that type of syntax?
Here's the context of my question:
type PushController (imp) =
inherit ApiController ()
member this.Post (po... | |
doc_13198 | <div class="w3-container w3-center" style="align-content:center;">
<br>
<br>
<h1 class="w3-center w3-jumbo">Find a Fruit Here</h1>
<form method="post" name="input-form" id="input-form" class="w3-center w3-mobile">
<h4 class="w3-center" style="max-width:1000px;align-content:center;">
... | |
doc_13199 | Is there any you know ?
A: There's always Enterprise FizzBuzz.
http://wolfbyte-net.blogspot.com/2007/09/if-something-is-worth-doing.html
Seriously, I've referred to this project quite a few times for ideas on how to set things up well.
A: This may be overkill, and a little too much code, but you could take a look at ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.