id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_100 | I have following html. (Frau = Mrs, Herr=Mr.)
Herr John Doe <br />
<br />
Frau Jane Smith <br />
I have following regex in my php-code with preg_match.
preg_match_all("!<li class='default highlightProfilePremium'>(.*?)<\/li>!is", $result, $match);
for ($i=0;$i<count($match[1]);$i++){
if(preg_match("!Herr(.*\W)<br... | |
doc_101 | I've googled it but nothing specific came up, and it doesn't seem to be documented on MSDN either.
Personally, I always use Keys.Control/Keys.Shift, because it works fine.
Edit: After reading KreepN's answer, I thought if you never have to use Control/Shift, why are they in the framework?
I mean, they aren't even the... | |
doc_102 | private void BtnSignin_Click(object sender, EventArgs e)
{
// SqlConnection con = StartCon();
foreach (Control c in this.Controls)
{
if (c is TextBox)
{
TextBox textBox = c as TextBox;
if (textBox.Text != string.Empty)
... | |
doc_103 | library(ggplot2)
library(gridExtra)
grid.arrange(
ggplot(mpg, aes(displ, cty)) +
geom_point(aes(shape = "Data")) +
stat_smooth(aes(linetype = "Regression"), method = "lm",
formula = y ~ x, se = FALSE, colour = 1, size = 0.5) +
scale_shape_manual(values = 1) +
labs(shape = "", linetype = "") +
... | |
doc_104 | (trying to install pecl svn extension)
sudo /Applications/XAMPP/xamppfiles/bin/pecl install svn
I choose autodetect for following:
Please provide the prefix of Subversion installation [autodetect] :
Please provide the prefix of the APR installation used with Subversion [autodetect] :
the last output from the command... | |
doc_105 | Should I change container, say to a std::map? Or just iterate once through my unordered_map, insert into a vector, and sort, then iterate? It's pretty unlikely that I will need to iterate in an ordered fashion repeatedly.
A: You could use Boost.MultiIndex, specifying the unordered (hashed) index as well as an ordered ... | |
doc_106 | In different projects I've used, beside others, jQuery and Sencha Extjs (with various working or nearly working gems that tried to integrate rails and the javascript).
I've highlighted those two frameworks because in my opinion are the Alpha and Omega of frameworks that could be used:
*
*jQuery is well known and d... | |
doc_107 | I have one codebase I build multiple versions of the app, all tailored to a different client using targets.
That said, I want to unify the build number and versions so when I write code and archive, all the apps are built with the same version/build numbers.
Can I have all the target plist files reference the main targ... | |
doc_108 |
geb.driver.DriverCreationException: failed to create driver from
callback
I've verified that I am downloading the MicrosoftWebDriver.exe to the expected directory in my project but I am not sure if I am missing something in my driver setup:
driver = {
EdgeOptions options = new EdgeOptions()
options.... | |
doc_109 | new Vector2(1.0f, 2.0f) + new Vector2(2.0f, 3.0f) // {X:3 Y:5}
(very handy)
But have look at this:
// Okay, this works fine.
new Vector2(1.0f, 2.0f) = new Vector2(1.0f, 2.0f) // true
// Is it checking for type equality?
new Vector2(1.0f, 2.0f) = new Vector2(6.0f, 5.0f) // true
So why doesn't it call the overloads on ... | |
doc_110 | <spring:beans>
<context:property-placeholder
location="file:///${mule.home}/conf/common.properties" />
</spring:beans>
This works fine for running the projects in Mule and from Anypoint Studio as in both cases mule.home is defined. It also works for running the MUnit test suites defined in the project from Any... | |
doc_111 | Html:
<div class="myclass selected">
Content 1
</div>
<div class="myclass">
Content 2
</div>
<div class="myclass">
Content 3
</div>
<ul>
<li><img src="http://www.lillehammer.com/ImageVault/Images/id_2122/scope_66/ImageVaultHandler.aspx" /></li>
<li><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/d7... | |
doc_112 | I have computed function where use reduce method to loop my objects, make some calculations inside of loop to find new variables and return array with summed values.
I know how to return sum of value inside of the loop but for only one variable, I don't know how to return 2 variables from computed, that's why I think t... | |
doc_113 | If i use cin i can input one string each time plus i cannot edit the input (except if i edit the string but this wont help)
Is there any way to input strings (with multiple lines) but not to break the string in one line at a time?
I am running ubuntu 12.04
A: Who is writing? Is it you, or some program??
Your terminolo... | |
doc_114 | like in hr_holiday class this method calling for get the calculation done....
def _get_number_of_days(self, date_from, date_to):
diffdays = end_date-startdate+hr_comapny_holidays.dates
return diffdays
how to do that ? I need to know the other lines for above function
"hr_company_holidays"
class hr_company_hol... | |
doc_115 | as old architecture design, code upload to GitHub with different frontend and backend repo.
still did not use DOCKER AND KUBERNETS, I want to implement them, in the new Architecture design, I used a private cloud server so, restricted to deploying on AWS\AZURE\GCP\etc...
share your Architecture plan and implementation ... | |
doc_116 | How can this be achieved?
Thanks in advance
A: You'd need to add the image view as a subview of a UIScrollView. You could install a UITapGestureRecognizer on the scroll view and set the numberOfTapsRequired property to 2. In the callback method of the gesture recognizer, just set the zoomScale property of the scroll ... | |
doc_117 |
A: The method suggested by sean could be used as first pass. As second pass you can try loading the stream into image and see if it is actually image?
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(imageFilePath);
request.Timeout = 5000;
request.ReadWriteTimeout = 20000;
HttpWebResponse response =... | |
doc_118 | I created class library, created Web Application project, then add reference to the class library in the Web Application project as explained here, but can't add "using" for it. (the namespace of customer.cs is also "CDemoLib")
(when i added "using CDemoLib;" i got 'cannot resolve symbol CDemoLib'
the code of customer.... | |
doc_119 | This is the issue:
To begin with, I have an array in this format:
Array (
[0] => 09:00
[1] => 10:00
[2] => 11:00
[3] => 12:00
[4] => 13:00
[5] => 14:00
[6] => 15:00
[7] => 16:00
[8] => 17:00
[9] => 18:00
)
Then some of the members are unset, so after that we're left ... | |
doc_120 |
*
*is it possible to embed a blogger comment ?
*how can I call blogger comments automatically . I wont to make like this code :
<script src='www.exemple.com/feeds/IDscomments/comments/default?alt=json&callback=showtopcomment&max-results=5' type='text/javascript'>
using like this :
ex :
data:comments.... | |
doc_121 | public class APP extends Activity {
MediaPlayer btnClick;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btnClick = MediaPlayer.create(this, R.raw.button_click);
}
... on Button Click play sound ...
btnClick.start();
...
}
But I ... | |
doc_122 | I have provided an example of a question that when answered would generate a text, this text would represent another question in my forum. This is the way I implemented, would this be inefficient (because of the whole screen re-rendering) and how can i make sure that only the "new" question would be rendered instead?
... | |
doc_123 | This is my code ( controller class )
File file = new File("/storage/emulated/0/DCIM/Facebook/FB_IMG_1496146656900.jpg");
RequestBody reqFile = RequestBody.create(MediaType.parse("image/jpeg"), file);
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), reqFile);
RequestBody name = Reques... | |
doc_124 |
An exception of type 'System.ArgumentNullException' occurred in System.Web.Mvc.dll but was not handled in user code
Additional information: Value cannot be null.
This is my controllers for create:
// GET: SkillSets/Create
public ActionResult Create()
{
var categoryIDs = db.Categories.Where(c => c.Active == 1).Sel... | |
doc_125 |
*
*as images via <img> or
*as CSS background-images?
This is slightly related to “Are SVG parameters such as 'xmlns' and 'version' needed”. The namespaces issues are clarified as necessary by the two answers and the MDN Namespace crash course.
But SVG 1.1 doesn't include statement on necessity of XML declaration ... | |
doc_126 | use std::fs;
use std::error::Error;
use serde_json::{Value, Map};
pub struct ConfigSerde;
impl ConfigSerde {
pub fn read_config(path: &str) -> Result<Map<String, Value>, Box<Error>> {
let config = fs::read_to_string(path)?;
let parsed: Value = serde_json::from_str(&config)?;
let obj: Map<S... | |
doc_127 | Some products have amount > 0 and price=0, which means that price is undefined. Some products have defined price (price>0), but amount=0. And third group have price>0 and amount>0.
I want to select products from this table in such order
*
*products with price>0 and amount>0
*products with price>0 and amount=0
*prod... | |
doc_128 | var myimg = $('#myimg');
... // Calculate x and y
myimg.css('left', x);
myimg.css('bottom', y);
Each image has a position: absolute style, while their containing div has a position: relative style.
This works in all browsers except for Internet Explorer 8 (have not tried 9). The images do not get their positions set. ... | |
doc_129 | we have functionality to highlight text in html see img:
http://s23.postimg.org/lbfbhyc8b/screen.jpg
in img you can see I have selected text "investment by nationals", and i want to highlight it, I must click button in header to select color.
on click i am focusing palette, and starting javascript interval to check hi... | |
doc_130 | Edit: What I meant about multiple data is for instance in my website, I have a Create Set of Officers and I only have one column for the names, an I wanted to insert the names that were created by the admin. Like the name of the President, Vice President, Secretary, etc. I hope you got my point.
A: If you mean to say... | |
doc_131 | Ok, some code:
class A {
String subject
String description
static hasMany = [cs: C]
static transients = ['numberOfCs']
Long getNumberOfCs() {
return cs.size()
}
}
class B {
String title
}
class C {
A objectA
B objectB
static belongsTo = [a: A]
}
Pretty c... | |
doc_132 | Thank you all.
A: "#include <hdreg.h>" and use ioctl HDIO_GET_IDENTITY to obtain a struct hd_driveid.
On this structure, the x->sector_bytes field is the sector size.
#include <stdlib.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <linux/hdreg.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#includ... | |
doc_133 | cur_date=$(date +"%m_%d_%y)
mkdir test_dir_$cur_date/
Which results in:
test_dir_09_12_16
test_dir_09_13_16
test_dir_09_14_16
etc...
as each day goes by.
What I'm trying to do is have a conditional check to see if the previous day directory exists and if it does, use rsync to transfer the differences from the previou... | |
doc_134 | I came out on red cloth as a valuable solution.
The messages will be saved in the DB like ;), :) ;(
* like described here but this is old: http://flip.netzbeben.de/2008/07/smilies-in-rails-using-redcloth/ I try that any comments on that solution in safety etc?
UPDATE:
Created a helper method , this one works
def emo... | |
doc_135 | I'm wondering, from which base class to derive that one in order to have such functionality like store binding ect?
A: Why don't you use standard ExtJs validation mechanism? It will produce exact outcome you want - a label next to the combobox.
A: Eventually I found that it can be a simple Ext.panel.Panel.
| |
doc_136 | dt = data.table(x=sample(8,20,TRUE),
y=sample(2,20,TRUE),
w = sample(letters[5:20], 20, TRUE),
u = sample(letters[2:25], 20, TRUE),
z=sample(letters[1:4], 20,TRUE),
d1 = runif(20), d2=runif(20))
Here is my dcasting code.
DC_1 = dcast.da... | |
doc_137 | I jump to line 150 with :150 and then my cursor is down at the bottom of the screen and I may wonder how the next couple of lines look like.
I'd like to know about a setting to let vim's cursor never reach the last 4~6 lines of the screen, instead it should scroll the text upwards.
Is such a setting possible?
A: Use
... | |
doc_138 | Is it possible to remove the hash form this filename. So just main.bundle.js?
A: As per my understanding the hash is used for production build so that one wont run into browser cache issues, and the users wont have to clear cache before using the new deployment.
I doubt that angular-cli team would give us an option to... | |
doc_139 | I have a logout button outside the modal which I want the user to click when he wants to logout. Also, I do not want to hide the modal.
$(document).ready(function() {
var dialog = document.querySelector('#main-dialog');
if (! dialog.showModal) {
dialogPolyfill.registerDialog(dialog);
}
di... | |
doc_140 | http.formLogin()
.loginPage("/login.html")
.loginProcessingUrl("/login.html")
.usernameParameter("username")
.passwordParameter("password")
.and()
.logout()
.logoutSuccessUrl("/login.html")
.logoutRequestMatcher(new AntPathReque... | |
doc_141 | The files have this layout:
- name: Sedan
tags:
- DIGIT
- ABC
- DEF
- YES
- name: Combi
tags:
- DIGIT
- ABC
- DEF
- NO
- nane: SUV
tags:
- DIGIT
- DEF
- YES
- nane: OTHER
tags:
- DIGIT
- ABC
- YES
The condition is: ABC && !DEF
So, print only the text-block that will have only ABC in... | |
doc_142 | open for write: mr/trunk/program/unitybranch/mr_unity5_0506/assets/ktplay/editor/xuporter
/mods/plugins/snsplugins/ktplaypluginweibo/weibo_sdk_3.1.3/weibosdk.bundle/images
/timeline_relationship_icon_addattention%403x.png,d\t6056t842881.tmp: The system cannot
find the path specified.
Submit aborted -- fix problems th... | |
doc_143 |
A: You can't get the part after the hash (#). It's on the brower's scope.
You can however get around this by notifying the server from the client what is the full URL. See here: How to get Url Hash (#) from server side
A: The part after # (called Fragment Identifier) is never sent to the server by the browser so you ... | |
doc_144 |
A: This is the NuGet Error NU1201.
Issue: A dependency project doesn't contain a framework compatible with the current project. Typically, the project's target framework is a higher version than the consuming project.
Solution: Change the project's target framework to an equal or lower version than the consuming ... | |
doc_145 | e. g.:
Dim objConn : Set objConn = OpenConnection()`
Is the colon used to combine the two statements into one line? I just want to be sure.
A: Yes this is correct. In VB style languages, including VBScript, the colon is an end of statement token. It allows you to place several statements on the same line.
A: What... | |
doc_146 | features it offers to create document models (Attributes, Methods, Static Methods..)
I use the virtual attribute feature of mongoose to create attributes that will not be persisted to MongoDB. However, these attributes are computationaly expensive (and using them many times is not helping me).
Lets take for example... | |
doc_147 | let player = AVPlayer(URL: NSURL(fileURLWithPath: tempFilePath))
player.addObserver(self, forKeyPath: "status", options: nil, context: nil)
And observe the change with the relevant function:
override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: Unsaf... | |
doc_148 | #1 アンジェリーナ・ジョリー
#2 %E3%82%A2%E3%83%B3%E3%82%B8%E3%82%A7%E3%83%AA%E3%83%BC%E3%83%8A%E3%83%BB%E3%82%B8%E3%83%A7%E3%83%AA%E3%83%BC
#3 Angelina_Jolie
*
*How do I recognize #2 from other strings, in other words, how do I check if the method CGI.escape (from Ruby or any other method that does the same thing) has been app... | |
doc_149 | [
{
"id": 1,
"name": "All",
},
{
"id": 2,
"name": "APR",
},
{
"id": 3,
"name": "TER",
}]
The second array is ["APR", "TER"]
I want to filter the first array with the second that is the output should be
[{
"id": 2,
"name": "APR",
},{
"id": 3,
"name": "TER",
}]
... | |
doc_150 | {
"Absoluteentry": 6,
"Name": "ricpez",
"OwnerCode": 16,
"OwnerName": null,
"PickDate": "2018-03-27",
"Remarks": "",
"Status": "ps_Released",
"ObjectType": "156",
"UseBaseUnits": "tNO",
"PickListsLines": [
{
"AbsoluteEntry": 6,
"LineNumber": 0,
... | |
doc_151 | The bandpass filter settings from Fiji that seem to work well for me:
(With apologies that my filter and FFT knowledge is... really bad, so maybe this is easily accomplished if I knew what to chain together, etc...)
A: A band pass filter similar to the low pass one you show in your link would be a white ring on a blac... | |
doc_152 | it works fine but the application freezes ,i did this code:
public static void shareArticleUrl(Context fromActivity,String subject,String URL){
List<Intent> targetedShareIntents = new ArrayList<Intent>();
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareI... | |
doc_153 | abstract class Letter {}
class A extends Letter {}
class B extends Letter {}
class C extends Letter {}
// potentially hundreds more "letters"
type LetterClass = any
const exampleUsage: LetterClass[] = [A, B, C]
attempting with typeof
type LetterClass = typeof Letter
const letters... | |
doc_154 | I would like to show this long lat coordinates after click to some place in map, not after move mouse on map as in the code. And make visible last coordinate until someone click to next place, nothing. I don't want the coordinates to disappear right away as in code.
<!doctype html>
<html lang="en">
<head>
<link r... | |
doc_155 | flag = True
possible = '0123456789abcdefghijklmnopqrstuvwxyz'
token = ''
length = 10
i = 0
current_datetime = datetime.datetime.now()
user = UsersModelForm()
if request.method == 'POST':
userf = UsersModelForm(request.POST)
username = userf.data['username']
pass... | |
doc_156 | commit 5
commit 4
commit 3
commit 2
commit 1
I now want to squash commits 1, 2 & 3 and remove commits 4 & 5 (dont need the changes anymore)
How can i do this?
A: Once pushed, you cannot easily change the history without affected other users, so it becomes a communication problem.
One approach would be:
*
*to squas... | |
doc_157 | <p><%= data[i].blocks.requestedBodyBlocks.body:latest:1[0].bodyHtml %></p>
The api is providing the data properly because when I run the requested url on google it works fine.
Please help.
SyntaxError: missing ) after argument list in C:\Users\HP\Desktop\NEWS\views\home.ejs while compiling ejs.
home.ejs
<%- include('... | |
doc_158 | Any ideas would be really helpful.
Thx in advance !
A: You can query the $SYSTEM.MDSCHEMA_CUBES DMV and check the LAST_DATA_UPATE column to find when the Tabular model was last processed. This only returns the results for the model that you're in so filtering the model isn't necessary. If you're looking to use XMLA... | |
doc_159 | $.ajax({
type: "POST",
url: '/messagingrest/v1/topics/SeasonalityTopic/messages',
headers: {
'Access-Control-Allow-Origin': '*',
'Authorization': 'Bearer ' + accessToken, // has a value for accessT... | |
doc_160 | ||
doc_161 | user_file = Path(str(message.author.id) + '.cvs')
if user_file.exists():
with open('test.csv', 'a') as fp:
writer = csv.writer(fp, delimiter=',')
writer.writerows(data)
else:
with open(user_file, 'w') as fp:
data = [('xp', 0)]
writer = csv.writer(fp, delimiter=',')
writer... | |
doc_162 | System.setSecurityManager(new SecurityManager() {
@Override
public void checkExit(int status) {
super.checkExit(status);
//custom exception extends SecurityException
throw new SystemExitCalledException();
}
});
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionH... | |
doc_163 | Example:
library(igraph)
library(ggraph)
library(tidyverse)
nodes <- tibble(id = 1:4,
gender = c("M", "F", "F", "M"),
names = c("Bob", "Allie", "Mary", "Johnathon"))
edges <- tibble(from = c(1, 3, 2, 4, 1, 2, 1, 4),
to = c(2, 2, 4, 1, 3, 1, 4, 3))
network <- graph_f... | |
doc_164 | right now i have
html
<%= link_to 'read more', @article %>
Controller
class StaticPagesController < ApplicationController
def home
@user = current_user
@article = Article.find(1)
end
def comics
end
end
this links to the first article because it sayd find(1) but im not too sure how to write this in ... | |
doc_165 | <form myValidations>
app.directive('myValidations', function(){
return{
//require: 'ngModel', note its commented out
link: function(s,e,a,ctrl){//note the emphasis on the ctrl
}
}
});
now how would I grip this ctrl.$parsers if I don't have the 'require: ngModel' to do it for me.
could i find an element... | |
doc_166 | const { getAuth, signInWithPopup, GoogleAuthProvider } = (await import('firebase/auth')).default;
Is there another way I should be lazy importing these modules from Firebase?
A: You don't need to import .default export iirc, try this:
const { getAuth, signInWithEmailAndPassword } = await import("firebase/auth");
Work... | |
doc_167 | [ngStyle]="{'-webkit-transform': 'rotate(' + ((marks.result * 1.8) - 90) + 'deg)'}"
gets compiled into style="transform: rotate(-59.4deg);"
I need it to retain the original code in such a way that it outputs as style="-webkit-transform: rotate(-59.4deg);". How can I achieve this?
A: I believe you'll need to use DomSa... | |
doc_168 | With video recording everything was fine until I've added audio input to AVCaptureSession. Problem is with AVAudioPlayer that plays melody - it just stops when AVCaptureSession starts. I did not find any restrictions on that in Apple docs.
Did anyone have experience with recording sound in AVCaptureSession simultaneous... | |
doc_169 | $str = {"fname":"lorem","sname":"ipsum","nick":"dolor"};
fname sname nick - are column names - and need to insert lorem ipsum dolor
I made an object - $obj = json_decode($str); - but what then?
in a plain example - without the object - it would be like this:
function insert($fname, $sname, $nick){
$sq = "insert in... | |
doc_170 | Here is my HTML:
<div class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></b... | |
doc_171 | Select
<select class="form__input form__select select optional" id="js-customer-field" name="customer[customer_food_attributes][16321232322354][customer_id]"><option value="">Select</option>
...
<select class="form__input form__select select optional" id="js-customer-field" name="customer[customer_food_attributes][023... | |
doc_172 | export const mockExecutorFactory = {
getExecutor: jest.fn().mockImplementation(() => {
return {
up: jest.fn().mockImplementation((_updatedInstance, _parameters) => {
console.log('****************************');
return Promise.resolve({ successful: true });
}... | |
doc_173 | Initially this was my code to do so:
for name in User.objects.all().values_list('username', flat=True):
if name not in Player.objects.all().values_list('player_name', flat=True):
new_player = Player(player_name=name, current_level_no=None, no_of_moves=None)
new_player.save()
else:
pass
But this would give ... | |
doc_174 | I know how to assign probabilities to random numbers in a worksheet (i.e. using MATCH() on the sum of the probabilities, there's plenty of stuff on SO explaining that), but I want a UDF because I'm passing a special input array into the function - not just a selected range.
My issue is, the weighting is off, numbers la... | |
doc_175 | Then I would like to send it to my app server so it can connect at any time with Google calendar.
I tried to use
GoogleAuthUtil.getToken(getApplicationContext(), mAccountName, mScope);
Following this article:
https://developers.google.com/accounts/docs/CrossClientAuth
When I use it with scope
mScope = "oauth2:ht... | |
doc_176 | Thanks
A: Try this This class provides developers with a simple way to ship their Android app with an existing SQLite database
A: rquest permission youself.
The way to get db:
package com.airi.buyue.data;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.os.Environment;
i... | |
doc_177 | order:
- !ruby/symbol day
- !ruby/symbol month
- !ruby/symbol year
So, my question is whether I should localize "day", "month" and "year" or not.
A: Short answer: No, you should not.
Long answer: Unless you're localizing some sort of source-code-processing software or something, which does need tra... | |
doc_178 | App\Profile::jenis must return a relationship instance, but "null" was
returned. Was the "return" keyword used? (View:
C:\xampp\htdocs\user_manage\resources\views\profile\profile.blade.php)
(View:
C:\xampp\htdocs\user_manage\resources\views\profile\profile.blade.php)
Model Jenis.php
<?php
namespace App;
use ... | |
doc_179 | Also on the console log, I'm receiving this message: E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.example.cameraxapp/files (Is a directory)
If any of you know the issue that I am having, please let me know and examples, will also be helpful. Thank you in advance!
Manifest
<u... | |
doc_180 | Sample Facts:
f-0 (initial-fact)
f-1 (green-peppers yes)
Is it possible to get the value of green-peppers(yes) so I can set a condition like this?
(if (eq <fact-1> "yes")
then
(assert)
)
Thank you!
A: CLIPS> (clear)
CLIPS> (assert (green-peppers yes))
<Fact-1>
CLIPS> (assert (green-peppers no))
<Fact... | |
doc_181 |
A: Compare the two different ways to store relational data:
*
*Embedded data
*Referenced data
Embedded Data:
Countries collection
(city information is embedded as an array of sub documents in country document)
{
"_id" : ObjectId("5e336c2bc0a47e0a958a2b9c"),
"name" : "France",
"cities" : [
{
... | |
doc_182 | so I made this
section .data
rev:
push eax
push ebx
push esi
push ecx
mov ebx,ecx
mov eax,esi
Lrev_1:
push dword[esi]
inc esi
loop Lrev_1
mov ecx,ebx
Lrev_2:
pop dword[eax]
inc... | |
doc_183 | I want to pass in and modify a large numpy array with pybind11. Because it's large I want to avoid copying it and returning a new one.
Here's the code:
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/numpy.h>
#include <vector>
// C++ code
void calc_sum_cost(float* ptr, int N, int M, float* ... | |
doc_184 |
I've chosen to use a collectionView because it's so much easier than a PageViewController to perform some tasks (since UICollectionView is a subclass of UIScrollView).
There's one downside though, I don't know how to insert the ViewContollers inside the UICollectionViewcells and if upon scrolling the viewController's ... | |
doc_185 | (UserID, [ProductsID1, ProductsID2, ProductsID3...])
For example:
('A395BORC6FGVXV', ['B001E4KFG0', 'B00813GRG4','B000LQOCH0','B006K2ZZ7K']),('A3SGXH7AUHU8GW', ['B001E4KFG0','B00813GRG4','B000LQOCH0']), ('AZOF9E17RGZH8', ['B001GVISJM']), ('ARYVQL4N737A1', ['B001GVISJM'])
From this, I have to create a result tuple when... | |
doc_186 | scala using Actor Model?
I'm trying to write a simple program with 3 actors.
*
*Actor "BossActor" creates 2 actors "Actor1" and "Actor2"
*"Actor1" takes 2 integer arguments -> finds their sum -> passes the sum to
Actor2
*"Actor2" prints the sum
package actorsSum
import scala.actors.Actor
import scala.actors.Actor... | |
doc_187 | from selenium import webdriver
driver = webdriver.Firefox(executable_path = 'C:\\...\\...\\geckodriver-v0.18.0-win32')
driver.get('http://www.supremenewyork.com/shop/all')
But when I launch it, nothing happens, python notices : [finished in 0.3s], and not any website is opened. Can someone tell me what is wrong ? Tha... | |
doc_188 | Now I want test it with Junit5+mockito.. I don't understand well guide in internet.. in particular how mock producer or consumer.. I use configuration for consumer and producer class for example:
@Configuration
public class Consumer {
@Autowired MqttPahoClientFactory mqttClientFactory;
@Bean
public MessageChannel topic... | |
doc_189 | getThemeBaseUrl = function() {
var customConfigPath = "./customer-configuration";
if (parseQueryString().CustomConfigPath) {
customConfigPath = parseQueryString().CustomConfigPath;
}
var clientId = parseQueryString().ClientId;
return customConfigPath + "/th... | |
doc_190 | How would i do that in python ?
I searched many times but i didn't find an answer.
*I want the program to get it like 'hey' at last, i want it to understand that 'heeey' means 'hey'.
A: import re
p = re.compile(r'(.)\1+')
test_str = "heeeey"
subst = r"\1"
result = re.sub(p, subst, test_str)
You can do it through re.... | |
doc_191 | Caveat to this question is that I just started learning OpenID and I know I don’t have a solid grasp on the specification which I think is leading to my confusion.
Any help would be appreciated!
A: Ok figured it out. I posted a question on Goolge's Federated Log API group and was told to use Attribute exchange.
Below... | |
doc_192 | I currently use two for loops, like so:
for (int i = 0; i < slotIds.Count; i++)
{
for (int j = i + 1; j < slotIds.Count; j++)
{
ExpressionInfo info1 = _expressions[i];
ExpressionInfo info2 = _expressions[j];
// etc...
}
}
Is it possible to convert these two for loops to LINQ?
Thank... | |
doc_193 | If i don't use the projection matrix I can get the square but it's stretched depending on surface's aspect ratio.
I'm building the matrix with the following code ( referring to https://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml ):
GLfloat projMat[16];
void ortho(float left, float right, float top, float bottom, fl... | |
doc_194 | My code is:
[tweetViewController setInitialText:[NSString stringWithFormat:self.url]];
A: You're getting this warning as you're using a variable when only a string literal (usually a format string) is allowed as an argument to this method.
If you don't want to use a format string don't use that method and use the abs... | |
doc_195 |
Cannot complete the install because one or more required items could not be found.
Software being installed: m2e - Maven Integration for Eclipse (includes Incubating components) 1.6.1.20150625-2338 (org.eclipse.m2e.feature.feature.group 1.6.1.20150625-2338)
Missing requirement: Maven Integration for Eclipse 1.6.... | |
doc_196 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public GameObject groundCheck;
public float moveSpeed = 9.2f;
public float acceleration = 50f;
public float jumpSpeed = 10f;
Rigidbody rigidBody;
float moveX;
int moveD... | |
doc_197 | public class BaseFoo
{
public bool BoolProp { get; set; }
}
public interface IFoo {
void Method();
}
public class FooClass : BaseFoo, IFoo
{
public void Method()
{
// DoSomething
}
}
public class MyClass
{
IFoo foo; //
public MyClass(IFoo foo)
{
this.foo = foo;
}
... | |
doc_198 | Like at this moment if you click on ¨boeken naar afas¨ then the link_to does something.
I want to have it on the div instead of the text. So when you click on the div then it will be triggerd the ¨update_bookkeeping_claims_claim_manager_path(@claim_manager), method: 'post'¨
.col-sm-6.col-md-5.col-lg-3.item.ibox-t... | |
doc_199 | public class A{...}
public class B extends A{
private C cObject;
private Object otherValue;
B(){
cObject = new C(this);
}
}
public class C{
private B bObject;
C(B bObject){
this.bObject = bObject;
}
}
I want to test a method of the class B. I am using mockito because I nee... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.