作为一名学生,我有许多语言/技术可以学习。除非定期进行练习,否则我常常会在2-3年内忘记过去的语言。
假设以后,您必须再次记住它。您几乎必须从基本开始并进行修改。有没有更好的方法来保留我学到的所有东西?
实时示例:作为一名学生,我必须学习C ++,JS,Vbscript,Bash,然后再通过Java和C#/。NET学习。我的辅助项目也在PHP中。
所有这些语法,功能数量和古怪的内部细节都不同。
特别是在C ++和Java中,必须记住很多内部细节。就像使用派生类对象初始化基类指针一样,C ++中的铸造方式也不同,还有许多其他语言都与之不同。
在2年内忘记所有这些只是巨大的损失。
您如何记住所有这些不同的语言和技术?
PS:我有一个快速参考表的想法。有没有人有创造一个的经验?有什么地方可以拿到吗?还有什么其他想法?
我试着写一个countingsort,但它有一些问题.
这是代码:
int *countSort(int* start, int* end, int maxvalue)
{
int *B = new int[(int)(end-start)];
int *C = new int[maxvalue];
for (int i = 0; i < maxvalue; i++)
{
*(C+i) = 0;
}
for (int *i = start; i < end; i++)
{
*(C+*i) += 1;
}
for (int i = 1; i < maxvalue-1 ; i++)
{
*(C+i) += *(C+i-1);
}
for (int *i = end-1; i > start-1; i--)
{
*(B+*(C+(*i))) = *i;
*(C+(*i)) -= 1;
} …Run Code Online (Sandbox Code Playgroud) 我正在开发一个类似于Skype的应用程序,具有更多功能.我对Skype对各种移动平台的反应感到好笑和惊讶,如iPhone,Android,黑莓,Symbian,Bada OS等.
我想知道Skype如何能够如此快速地发布适用于iPhone,Android和Blackberry的版本?
他们是否单独编写针对每个平台的代码,还是只编写一次代码然后使用某些实用程序使其在所有平台上都可用?
作为一名开发人员,我很想知道真正的技术,这可能是幕后魔术背后的原因.有线索吗?
有效的来源和参考的答案更受赞赏.
我正在使用Visual Studio 2010,C++.
我要做的是从加载的图像中检索像素数据(特定于RGB颜色),然后在各种检查中使用它.目前,我想循环遍历所有数据,并能够检测像素何时是某种颜色(特定的R,G和B值).
我应该注意到我正在使用DevIL,我更喜欢继续使用DevIL(我已经看到了一些建议,可以帮助处理图像处理的其他工具).
现在,据我所知,DevIL函数ilgetData()检索一个指针,该指针包含一维字节数组中所有像素的所有RGB值.我不知道如何存储使用此函数获取的数据,然后在for循环中使用它.
示例代码非常感谢.
我不能使用mysql_real_escape_string因为我们没有使用mysql(而是毛毛雨),所以我做了一个自定义转义函数.请告诉我这是否合适
function escape($value)
{
$return = '';
for ($i = 0; $i < strlen($value); ++$i) {
$char = $value[$i];
$ord = ord($char);
if ($char !== "'" && $char !== "\"" && $char !== '\\' && $ord >= 32 && $ord <= 126)
$return .= $char;
else
$return .= '\\x' . dechex($ord);
}
return $return;
}
Run Code Online (Sandbox Code Playgroud)
我将主要在几个SQL中使用它来获得$ value
我正在尝试调用该dist()方法但是我一直收到错误,说dist()必须返回一个值.
// creating array of cities
double x[] = {21.0,12.0,15.0,3.0,7.0,30.0};
double y[] = {17.0,10.0,4.0,2.0,3.0,1.0};
// distance function - C = sqrt of A squared + B squared
double dist(int c1, int c2) {
z = sqrt ((x[c1] - x[c2] * x[c1] - x[c2]) + (y[c1] - y[c2] * y[c1] - y[c2]));
cout << "The result is " << z;
}
void main()
{
int a[] = {1, 2, 3, 4, 5, 6};
execute(a, 0, sizeof(a)/sizeof(int));
int …Run Code Online (Sandbox Code Playgroud) 我正在编写一个应用程序,它将在UIImageView中显示在我的服务器上找到的图像.
我需要一些异步下载图像并将其缓存在UIImageView中的东西.当我按下按钮时,也需要能够取消下载.
谁能指出我可以做到这一点的方向?
今天有人问我这个问题.在C++中需要引用的是什么,为什么在C++中Bjarne Stroustrup考虑过reference.
我想在数据数组中选择具有特定参数值的元素.
例如:
[{type: "suv", value:10},{type: "suv", value:20},{type: "berline", value:15},{type: "berline", value:5}]
Run Code Online (Sandbox Code Playgroud)
那么,type:"suv"在绘制我的价值数据时,我怎么才能考虑到这一点呢?
我能找到的唯一类似的东西是selectAll,但它似乎只选择UI中的元素(?)
如果这更简单,请耐心等待,我不太习惯d3.js,关于这个主题的信息很少见.
我正在开发我的第一个使用通用方法的程序。我认为我通过将参数设置为正确地做到了这一点,selectionSort(T[] a)以便该方法可以接收任何对象的数组。
public class SelectionSort {
protected int[] arrayOne = {1,2,3,4,5,6,7,8};
protected double[] arrayTwo = {1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0};
public static <T extends Comparable<T>> void selectionSort(T[] a)
{
for (int index =0; index < a.length; index++)
{
int minElementIndex = index;
T minElementValue = a[index];
for (int i = index + 1; i < a.length; i++)
{
if (a[i].compareTo(minElementValue) < 0)
{
minElementIndex = i;
minElementValue = a[i];
}
}//end of inner for loop
a[minElementIndex] = a[index];
a[index] = minElementValue;
}//end …Run Code Online (Sandbox Code Playgroud) c++ ×4
image ×2
android ×1
asynchronous ×1
blackberry ×1
d3.js ×1
devil ×1
distance ×1
escaping ×1
exception ×1
generics ×1
ios ×1
iphone ×1
java ×1
javascript ×1
mobile ×1
objective-c ×1
php ×1
pixels ×1
skype ×1
sorting ×1
square-root ×1
syntax ×1
xcode ×1